Quick & Cheap > Knowledgebase > Managing Linux VPS/Server > MySQL password, how to reset it


MySQL password, how to reset it




There are some cases when You need to know what is your MySQL server password.

If you dont know your mysql password for your server or VPS, try this:

- dont write any password, just hit Enter key
- your default ssh login password
- password: root
- password: admin
- password: test

If you forgot mysql password and have no luck, then do these steps to reset your password.

Stop mysql

/etc/init.d/mysqld stop
OR
service mysqld stop

Start mysql in safe mode

mysqld_safe --skip-grant-tables

Login to mysql without password

mysql --user=root mysql

Add new password to the mysql for user root

update user set Password=PASSWORD('newpassword') where user='root'; flush privileges; exit;

Start mysql again

/etc/init.d/mysqld start
OR
service mysqld start


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Mail issues on Webmin (Views: 2760)

Powered by WHMCompleteSolution