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.

Upgrade MySQL4 to MySQL5 on cPanel server

Posted by Clayton | Posted in Linux, SSH, Tutorial | Posted on 10-21-2009

3

Upgrading MySQL versions is a quick and easy process, not much work involved. Always be sure to make a backup before you start though, just in case the upgrade fails or some other unforeseen issue arises.

cp -Rpf /var/lib/mysql /var/lib/mysql.BAK
Login to WHM –> Tweak Settings –> MySQL -> 5.0  and Save settings
/scripts/mysqlup –force
/scripts/perlinstaller –force Bundle::DBD::mysql
/scripts/realperlinstaller –force DBD::mysql
Recompile PHP

You’re done :)