- First of all we need to stop mysql
/etc/init.d/mysql stop
- Create a mysql table dump to reset the password
UPDATE mysql.user SET Password=PASSWORD('YOUR-NEW-MYSQL-PASSWORD') WHERE User='root';
FLUSH PRIVILEGES;
- Now we need to start mysql in safe mode and import the mysql table dump
mysqld_safe --init-file=/path/to/mysql/table/dump &
- Finally we need to kill mysql and start it in normal mode
killall mysqld
/etc/init.d/mysql start
- Your password should now be reset to the one you specified in the mysql table dump
dump, forgot, mysql, password, premissions, root, table
This post was written by:
Duffy - who has written 48 posts on Tuts4Tech.
I am the owner of this website, please feel free to ask me any questions you have
Contact the author
This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.