Menu Close

Reset the password for the Mysql root account with command line

Log in to mysql

mysql -u root -p 'your current password'

Type the following commands to change the password:

mysql> use mysql;
mysql> update user set password=PASSWORD("YOUR-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

That’s it.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *