#1 (permalink)  
Old 08-28-2006, 10:03 AM
ricoche's Avatar
Registered User
 
Join Date: Feb 2003
Posts: 108
ricoche is on a distinguished road
Mysql 5 access denied problems

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-28-2006, 11:05 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Posted a solution for this a while back:
http://forums.cpanel.net/showpost.ph...29&postcount=8
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-28-2006, 06:29 PM
ricoche's Avatar
Registered User
 
Join Date: Feb 2003
Posts: 108
ricoche is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-28-2006, 09:58 PM
ricoche's Avatar
Registered User
 
Join Date: Feb 2003
Posts: 108
ricoche is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-30-2006, 01:42 AM
ricoche's Avatar
Registered User
 
Join Date: Feb 2003
Posts: 108
ricoche is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:57 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc