I receive the message when going to my website:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'a5760312_csgodep'@'localhost' (using password: YES) in /home/a5760312/public_html/index.php on line 3
Connection problem:
Access denied for user 'a5760312_csgodep'@'localhost' (using password: YES)
How can I fix this?
The line (3) in question is:
$connection = mysql_connect('localhost', 'a5760312_csgodep', 'mypassword')
(the password is changed for security purposes) Any help/solution is appreciated, thanks!
GRANT INSERT, SELECT, DELETE, UPDATE ON your_database.* TO 'a5760312_csgodep'@'localhost' IDENTIFIED BY 'your_password';
This could be the reason that your mysql server password for this user is not set (has not given a password). So you can try out the following connection method.
$connection = mysql_connect('localhost', 'a5760312_csgodep', '');
Or else you can use the following query to change the password of your mysql user
ALTER USER user IDENTIFIED BY 'password';
This should be run on mysql server