MySQL > Administration > Commands > Manually Replacing the Admin Password.

Databases
Generally speaking, this problem should be avoided. You should always keep good track of your root password and admin password. Of course, stuff happens. And when bad stuff hits the fan, there does exist a way you can reset your admin password without having to be able to hack into the Pentagon.

Here's how you replace your admin password in MySQL 4.x or 5.x, in just 4 Easy Steps! (yes, really).


# HOW TO SET A NEW ADMIN PASSWORD TO MySQL 4.x or 5.x:

1) Stop mysql.

2) Then start MySQL with:
    --skip-grant-tables  option

3) Then login as root by running:
    mysql -q -u root

4) Then run:
    UPDATE user SET Password=PASSWORD('mynewpassword')

ie:  UPDATE admin SET Password=PASSWORD('7b19duck5')

Note: One variation on the command:  UPDATE user SET Privileges=PRIVILEGES('target_database')

# # # # # YOUR ACCESS TO THE TOP SECRET GEEK-TRIX FILES HAS NOW BEEN GRANTED. YOU MAY PROCEED. HAVE A NICE DAY. # # # # #


more digital solutions found at:
MySQL.org
xdose.com
ContentAndAds.com
qmailrocks.org
FreeBSDRocks.net
TheSwamp.info
FileCorner.com