(Reading time: 1 minute)

 MySql

  • Stop the mysql service or process
  • Connect to the mysql server and execute the following SQL statements:

UPDATE mysql.user SET Password=PASSWORD('NewPassword') WHERE User='root'; 
 
FLUSH PRIVILEGES; 

The UPDATE statement resets the password for all root accounts and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change.

  • Stop the server and restart it normally. Now you should be able to connect to the MySQL server as root using the new password.

 

Oxygen
Author: Oxygen
Other articles by this author

Chillzee Tag Cloud

Let's Socialize

About Chillzee

Chillzee.com is an entrepreneurship portal.

The site provides informative topics on Organizational and Strategic needs.