MySQL Error in Fantastico
Posted by Clayton | Posted in cPanel, Tutorial | Posted on 03-14-2012
0
A client opened a ticket since they were receiving the following error when trying to install a script via fantasticrap…I mean fantastico.
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘linuxnoo’@'localhost’ (using password: YES) in /tmp/cpanel_phpengine.1304688239.24500MvupN_eQWd on line 1642
Access denied for user ‘linuxnoo’@'localhost’ (using password: YES)
This issue is caused by a mismatch in the cPanel password and the MySQL users password. You can verify this in SSH by running the following.
mysql> use mysql;
mysql> select user,password,password('YourPassword') from user where user='YourCpanelUser';
+----------+-----------------------------+-----------------------+
| user | password | password('--') |
+----------+-----------------------------+-----------------------+
| linuxnoo | *E6.....3F | *B6.....3A |
+----------+-----------------------------+-----------------------+
2 rows in set (0.00 sec)
As you can see above, the two password fields do not match so we need to update this.
mysql> update user set password=password('bNEQL13dvJ') where user='linuxnoo' limit 2;
mysql> select user,password,password('bNEQL13dvJ') from user where user='linuxnoo';
+----------+-------------------------------------------+-------------------------------------------+
| user | password | password('bNEQL13dvJ') |
+----------+-------------------------------------------+-------------------------------------------+
| linuxnoo | *E6D911C8973EEDDA0CE0618EFB493E704776DB3F | *E6D911C8973EEDDA0CE0618EFB493E704776DB3F |
+----------+-------------------------------------------+-------------------------------------------+
2 rows in set (0.00 sec)
After the password update try to install again and it should work just fine.