How to Reset a MySQL Password
A MySQL password can be reset in 5 easy steps:
- Stop the mysqld daemon process.
- Start the mysqld daemon process with the –skip-grant-tables option.
- Start the mysql client with the -u root option.
- Execute the UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;
- Execute the FLUSH PRIVILEGES; command.
These steps reset the password for the “root” account to “password.” To change the password for a different account or to set a different password, just edit the variables in single quotes in step 4.
If the user knows his/her existing MySQL root password, steps 1-3 are not necessary.
Comments (8)
Leave a Reply
- How to Reset a Mac OS X System Administrator (root) Password
Warning: Unless deliberately changed, the keychain password is bound to the original administrator password. This originally provided single sign-on capabilities. Using the following method to reset one’s administrator password will require additional steps to also reset the keychain password. Please be advised that this may mean deleting any keychain protected with one’s original administrator password. [...]...
- How to Reset a Mac OS X Keychain Password
A default keychain binds to an Administrator password upon creation and will continue to update when the Administrator password is updated via the Accounts menu. When someone forgets his/her password and is forced to utilize other means to reset it (See FAQ entitled: How do I reset a Mac OS X System Administrator (root) Password?), [...]...
- How to Reset an Acer BIOS Password
If the user can boot the Acer, he/she may be able to reset the BIOS password using Acer eSettings Management. Click the Start button Click the All Programs menu item Click the Empowering Technology menu item Click the Acer eSettings Management menu item Once inside Acer eSettings Management, click the Security button. Sending a Computer [...]...
- How to Reset a Dell BIOS Password
Dell Dimension BIOS Password Recovery The BIOS password may be cleared from a Dell Dimension by moving the password jumper on the motherboard. The password jumper’s location on a Dell Dimension motherboard can be found by reviewing the Dimension User Guides. For most Dell Dimension desktops, the steps to reset a BIOS password and clear [...]...
- Reset IBM ThinkPad BIOS Password
An IBM ThinkPad laptop can have three hardware password sets: Power-On Password Hard Disk Password Supervisor Password Power-On Password RT/CMOS RAM has 8 bytes reserved for the power-on password and the check character. The 8 bytes are initialized to hex 00. The microprocessor can access these bytes only during POST. After POST is completed, if [...]...





very useful
Hi i would like to know how to make my mysql console stop asking for password.When i installed mysql firsttime i could login directly without a password.I do know my current password but would like to go back to as it were.
Thanks in advance!
It doesn’t work, nothing happens after I type UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’; My console changes from ‘mysql>’ to ‘`>’ and that’s all.
You might have a syntax error in the command at step 4, it should be
UPDATE mysql.user SET Password=PASSWORD(“password”) WHERE User=”root”;
This works for me. Cheers
I mean, there should be double-quotes instead of single-quotes, seems like my command line makes a difference on this…
I’m guessing either will be fine depending on context. Did single quotes work for anyone else?
Correct single quotes work, but not the one used in the blog post. This works indeed (regular single quotes here) :
UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’; FLUSH PRIVILEGES;