Please help, Have tried to configure my new site which uses mysql unsuccessfully. I have a config.php file which has all the connections parameters. i created a Database and user then gave all the privileges to this user. w I have specified in the config file the user info. Am getting this kind of error; Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username'@'localhost' (using password: YES) in /home/domain/public_html/config/config.php on line 11 Access denied for user 'username'@'localhost' (using password: YES) I have tried recreating the whole thing again and again to no success. I used the same details in another server and everything worked perfectly. Please I will appreciate your help.
It's a well known problem with authentification between PHP and MySQL. You may have to change the password hash from the new format to the older format used by MySQL in order to have PHP able to connect. Run this on you mysql server: UPDATE mysql.user SET password=old_password("youroldhashpassword") WHERE user ='youruserid' and host ='yourhost' Code (markup): youroldhashpassword is the password you've set youruserid is your username (most likely 'root' if running on Windows) yourhost is most likely localhost You can see all users on your database by running this on database "mysql": SELECT * FROM `user` Code (markup): More info : http://www.php.net/mysql_connect http://www.digitalpeer.com/id/mysql http://dev.mysql.com/doc/refman/5.0/en/password-hashing.html PS. After you update to the older password hashing using OLD_PASSWORD() you *may* have to run : FLUSH PRIVILEGES Code (markup): I never had to.