How to change mysql database password in ubuntu?

1.Login as root
sudheer@VY-B3:~$ mysql -u root -p
Enter password:vidyayug
2.select the database:
mysql> use mysql;
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
3.update the password with new password
mysql> update user SET password=PASSWORD("sudheer")where User="root";
4.flush privileges.
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
5.exit from prompt
mysql> quit;
Bye
6.test new password is working or not?
sudheer@VY-B3:~$ mysql -u root -p
Enter password:sudheer

Search This Blog

All the rights are reserved to this blog is belongs to me only.. Powered by Blogger.