Mysql - How to reset mysql root password, Change mysql root password

How to reset mysql root password

Changing mysql root password:

1. Stop MySQL:
 # /etc/init.d/mysql stop

2. Start the MySQL server without privilege tables:
 # mysqld --skip-grant-tables

3. Start the mysql client:
 # mysql

4. Find name of admin user (probably 'root'), update password:
 # select user,host,password from mysql.user;
-- reset password for admin user 'root' (or whatever the name is)
 # update mysql.user set password=PASSWORD('new_pass') where user='root';

 # flush privileges;

 # exit;

5. Stop mysqld, eg in another command window...
 # mysqladmin shutdown

4. Restart MySQL:
 # /etc/init.d/mysql start  

The topic on Mysql - How to reset mysql root password is posted by - Math

Hope you have enjoyed, Mysql - How to reset mysql root passwordThanks for your time

Tech Bluff