Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Mysql 5 access denied problems

Discussion in 'Database Discussion' started by ricoche, Aug 28, 2006.

Thread Status:
Not open for further replies.
  1. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Hello,

    I keep getting the following error when restarting Mysql in WHM.

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' mysql has failed, please contact the sysadmin (result was "mysql has failed").

    Mysql is running just fine. When I restart mysql with the command line I get the following:
    Shutting down MySQL.[ OK ]
    Starting MySQL[ OK ]


    I also cannot connect using the command line mysql -u user_name -p.

    If I try to change the mysql password in WHM I get the following messages:
    Mysql password change failed!!
    A forced reset will now be attempted.


    I then try resetting the password in WHM, but it doesn't reset. When I try to reset the password in WHM and then use this new password with the above command line, I get the following message:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    I can see a password in /root/.my.cnf but it doesn't work and sometimes it changes if I modify it in any way. Not exactly clear how it changes on it's own, but if I tinker with updating mysql, cpanel, or other for example I notice the password changes.

    I'm trying to run PHP 5.1.5, MySQL 5.0.24, and Cpanel R119.

    Here is a basic my.cnf file I'm using for just trying to get things started. This gets mysql up and running, but it still gives me the error above.

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    set-variable = max_connections=500
    safe-show-database

    [mysql.server]
    user=mysql


    This is all on a new server. Perhaps I need to have someone take a look, but I'm not sure of any server maintenance companies that might be able to help.

    Thanks very much.

    Jim
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Hi Chirpy,

    Thanks very much for the reply. Much appreciated.

    I actually saw your post while doing my searches here and gave it a try before posting but didn't have any luck unfortunately. After your reply, I took a closer look and gave it another whirl, but still no luck.

    After I get Mysql running, I check phpmyadmin for example and I am still getting the error "Wrong username/password. Access denied." I am also still getting the following error as mentioned above when restarting Mysql in WHM.

    /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' mysql has failed, please contact the sysadmin (result was "mysql has failed").

    This is a brand new server, so I'm thinking I should maybe have the datacenter re-setup everything? Or perhaps I see you have some services Chirpy so perhaps one of those might help me to get up and running.

    Note, I have other servers, but my intention for this one is to run only as a test server with Mysql 5 and PHP 5 since I have some programming projects I need to test. It's not critical that I have everything running for a production environment, but of course one needs php and mysql both running to do script testing. <grin>

    Thanks again,

    Jim
     
  4. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Hi again,

    Just to follow-up I decided to pay and have someone take a look at the problem. It could be quite simple, but with the few years experience I've had with my servers it looks a bit beyond what I've encountered and don't have a lot of time to tinker around until these things get fixed. <grin> I've tried just about everything I could find on these forums and other places but have yet to find any solution that works. A lot of people seem to have problems with the same or similar error response, but I think the cause of the problem may be different. I'll be sure to post the answer here shortly once I get things up and running.

    Thanks again,

    Jim
     
  5. ricoche

    ricoche Well-Known Member

    Joined:
    Feb 7, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    This issue has now been resolved.

    Apparently I had issues related to my DNS that was causing the problem. Once I solved all of the Bind/DNS issues on the new server, Mysql popped right into gear. I didn't even think to look there, but thought I'd work on something else. Once that was all clear, I suddenly noticed Mysql was working great.

    Thanks for the help.

    Jim
     
  6. useradmin

    useradmin Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    INDIA
    mysql failed

    HI,


    We tried .mysql.recover solutions but it didnt help.

    so how to fix?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,472
    Likes Received:
    421
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:


    This thread is over 4 years old. Please start a new thread with details of your problem for assistance, thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice