mysql:reset_root_password
This is an old revision of the document!
MySQL - Reset root password
To recover the MySQL root password if forgotten.
- Stop the mysqld daemon process.
- Start the mysqld daemon process:
--skip-grant-tables
- Start the mysql client
-u root
- Execute the command
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
- Execute the command
FLUSH PRIVILEGES;
- Use mysqladmin to shut down the MySQL daemon:
mysqladmin shutdown
- Start MySQL server as per normal.
mysql/reset_root_password.1585815302.txt.gz · Last modified: 2020/07/15 09:30 (external edit)