Reset MySql root password (No password needed)

The day finally came, and not in a good way but I forgot my MySql root password…….
I found a quick and easy way to recover the MySql root password, and frankly it scares me how easy it is to reset the root password. You only need sudo access and 2 min later your done and you have a new password for your MySql root user. I have tested this on Mysql (MariaDB) v. 5.5.52 It is easily done in four simple steps.

  1. First stop the MySql Server.

  1. Start the MySqld configuration.

  1. Login to MySql as root. (you don’t need a password here)

  1. Replace SETNEWPASSWORD with your new password!

And that is it! I hope it worked for you like it did for me!