May 27, 2020


Debian & Ubuntu – Recovering MySQL root password

sql-iconHaven’t needed to reset my MySQL root passwords yet, but I suspect someday….
On a Debian based system this is easy and also demonstrate the importance of restricting physical access to your server.

First run (sudo or root):
dpkg-reconfigure mysql-server-5.5


Then just type your new password and confirm it. The database will restart, and your MySQL now have a new root password.

Happy passwording!