reset password root mysql
Posted by: decees on: July 7, 2009
Alternatively, on any platform, you can set the new password using the mysql client (but this approach is less secure):
- Stop mysqld and restart it with the –skip-grant-tables option.
- Connect to the mysqld server with this command: shell> mysql
- Issue the following statements in the mysql client. Replace the password with the password that you want to use. mysql> UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) -> WHERE User=’root’; mysql> FLUSH PRIVILEGES;
You should now be able to connect to MySQL as root using the new password.
Advertisement
Like this:
Be the first to like this post.