MySQLRecover and reset the default root password for MySQL 5.7+

Introduction

After MySQL 5.7, when we install MySQL sometimes we don't need to create a root account or give a root password. By default when we start the server, the default password is stored in the mysqld.log file. We need to login in to the system using that password and we need to change it.

Remarks

Recovering and resetting the default root password using this method is applicable only for MySQL 5.7+