unable to connect to mysql since latest whm cpanel upgrade
Hi
CENTOS 5.10 x86_64 standard " server
WHM 11.44.1 (build 15)
MySQL (5.1)
WHM upgraded automatically on my server last night and I received various error messages from server regards the upgrade. No significant problems on most of websites on server noticed yet, other than one script that is unable to connect to mysql using root password.
I have checked the mysql root password in .my.cnf and have set that correctly, yet still not connecting. I am getting message that I need to upgrade mysql, however would have thought that existing scripts would work until that is done.
a simple mysql connection script is being used, can anyone think of any reason why this script has stopped working after latest upgrade? I wanted to open a support ticket, but also cant login and tried to reregister, but am not receiving the emails for some reason
$username = "root";
$password = "********************";
$hostname = "localhost";
$dbname="******";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
//select a database to work with
$selected = mysql_select_db("***",$dbhandle)
or die("Could not select examples");
-
problem solved had to reset password in database tables as well as whm my.cnf 0 -
Hello :) I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome. 0 -
Thanks, unfortunately shortly the fix, same problem arose and received the following error message...maybe there is somewhere else i need to change the password? the thing is system says it restored password to that which is in my.cnf, but that should have been correct as i had just checked it there. The system was unable to authenticate to the local MySQL server on "localhost". The connection driver reported the following error: "Cpanel::DBI::Mysql connect('','root',...) failed: Access denied for user 'root'@'localhost' (using password: YES)". The system automatically reset the MySQL root password in order to restore normal operations. The system restored the password to the password in "/root/.my.cnf". 0 -
Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
4 comments