Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    3

    Default /usr/bin/mysqladmin: connect to server at 'localhost' failed

    Helllo !!!

    when i make restart or update to mysql

    this problem appears :

    /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").


    and it faild now


    Thanks ,,,,,,,,,,,,,,,,,,

  2. #2
    Member
    Join Date
    Nov 2004
    Posts
    37

    Smile reset the mysql root pw

    As root in shell,

    mysqld_safe --skip-grant-tables --old-passwords &

    mysql -u root -p <enter and add new pass>

    Hope this helps,


    Regards,
    Prashant

  3. #3
    Member Miraenda's Avatar
    Join Date
    Jul 2004
    Location
    Coralville, Iowa USA
    Posts
    244

    Default

    Truly, the above steps aren't detailed enough to explain how to reset the root password for someone who might not know MySQL (and given the thread, that seems likely).

    Here are detailed steps needed to fix the issue:

    1. Disable MySQL Monitoring

    Go to WHM > Service Manager and uncheck monitor for MySQL (so it doesn't restart while fixing the issue), then save the area

    2. Stop MySQL in root SSH (if it is running, if not running at all, then this can be skipped)

    Code:
    /etc/init.d/mysql stop
    3. Start MySQL without the password prompt

    Code:
    mysqld_safe --skip-grant-tables &
    4. Get a copy of the current MySQL root password

    Code:
    cat /root/.my.cnf
    Copy down what it shows for the password.

    5. Log into mysql command line in root SSH and reset the password

    Code:
    mysql -u root
    \u mysql
    update user set password=("NEW-ROOT-PASSWORD") where User='root';
    flush privileges;
    quit
    Please replace NEW-ROOT-PASSWORD above with the actual password copied from /root/.my.cnf earlier.

    6. Restart MySQL and check it's working

    Code:
    /etc/init.d/mysql start
    mysqladmin proc
    If you can get a return of the processlist, it's working (not to mention it would have started properly at that point to show it's working).

    7. Re-enable monitoring in WHM

    Back in WHM > Service Manager, re-check monitor box for MySQL and save the area.
    Last edited by Miraenda; 08-18-2010 at 09:58 AM.

Similar Threads & Tags
Similar threads

  1. mysqladmin: connect to server at 'localhost' failed
    By chips12 in forum Database Discussions
    Replies: 1
    Last Post: 11-19-2010, 06:41 AM
  2. /usr/bin/mysqladmin: connect to server at 'localhost' failed
    By Linux.RedHat in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 08-18-2010, 09:56 AM
  3. /usr/bin/mysqladmin: connect to server at 'localhost' failed error:....
    By woody200456 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-29-2006, 06:51 PM
  4. Replies: 0
    Last Post: 05-29-2006, 12:31 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube