The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

unable to connect to mysql since latest whm cpanel upgrade

Discussion in 'General Discussion' started by chips12, Aug 14, 2014.

  1. chips12

    chips12 Active Member

    Joined:
    Nov 6, 2010
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    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");
     
  2. chips12

    chips12 Active Member

    Joined:
    Nov 6, 2010
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    problem solved had to reset password in database tables as well as whm my.cnf
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. chips12

    chips12 Active Member

    Joined:
    Nov 6, 2010
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    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”.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page