MySQL Password Recovery
From RZWiki
| Error creating thumbnail: (process:20118): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied convert: unable to open image `/home/routerzone/httpdocs/wiki/images/5/51/Mysql.svg': No such file or directory. convert: missing an image filename `PNG:/home/routerzone/httpdocs/wiki/images/thumb/5/51/Mysql.svg/48px-Mysql.svg.png'. |
The following details the basic procedure for performing password recovery for MySQL running on a Linux platform;
- Stop the MySQL deamon: /etc/init.d/mysqld stop
- Start the MySQL deamon without user privilege enforcement and thus, for security reasons, any networking functions: /etc/init.d/mysqld start --skip-grant-tables --skip-networking
- Change the account password as required, the root account is used in this example:
- mysql -u root
- mysql>SET PASSWORD FOR root@'localhost' = PASSWORD('new_password');
- mysql>UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root';
- mysql>FLUSH PRIVILEGES;
- mysql>exit
- Stop the MySQL deamon again: /etc/init.d/mysqld stop
- Start the MySQL deamon as normal: /etc/init.d/mysqld start
Usage Notes
The UPDATE command is only necessary if you have a MySQL account that can connect from 'everywhere'
Related Articles
See our other Password Recovery articles
See our other MySQL articles
Information on Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Vyatta commands
Information on Extreme commands
Information on Zebra commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands
(replacing the # with an @) |





