Run the following commands separately to change/reset your 'root' user password in MySql database.
In this script, it is assumed that your new password is 'MyNewPassword'. Hence, replace that with what ever you want your password to be.
UPDATE mysql.user
SET Password=PASSWORD('MyNewPassword')
WHERE User='root';
FLUSH PRIVILEGES;
More info can be found here.
Some Info:
There is a database called 'mysql' in MySql which is the default database. It is where Users such as 'root' are stored.In this script, it is assumed that your new password is 'MyNewPassword'. Hence, replace that with what ever you want your password to be.
UPDATE mysql.user
SET Password=PASSWORD('MyNewPassword')
WHERE User='root';
FLUSH PRIVILEGES;
More info can be found here.
No comments:
Post a Comment