Tips, Tricks, News & Offers
If you would like to be kept up to date with Internet technology changes, Idaq technical tips & How To's plus discounts and special offers, subscribe to our Tips, Tricks and offers Newsletter:

First Name:
Last Name:
Knowledgebase: Dedicated Servers
How do I recover my MySQL server password?
Posted by John Imison on 29 January 2007 11:10 AM
If you have forgotten your MySQL root password, or, for some other reason misplaced the password you can recover the MySQL root password on your dedicated server by following the below steps:

  • To reset the MySQL daemon root password issue the following commands:

    [root@linux root]# killall mysqld
    [root@linux root]# /usr/libexec/mysqld -Sg --user=root &

    # Note: your system may have a different path to the mysqld binary
    # Note: if the -Sg flag doesn't work starting your mysqld you may have better luck with
    'mysqld --skip-grant-tables --user=root'
  • Goto the command line and use the MySQL client:

    [root@linux root]# mysql
    Welcome to the MySQL monitor.
(97 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Hosted by Idaq