Need help to solve Mysql Reset Password

Posted March 18, 2016 3.5k views

Hi Friends,

I have installed MYSQL 5.7 centos 7

I have restore my old MYSQL.DB from version 5.5.46 to MYSQL 5.7
Now I am not able to login or even not able to reset password.

Getting Below error.

[root@database ~]# mysqldsafe –skip-grant-tables &
[1] 18417
[root@database ~]# -bash: mysqld
safe: command not found

Please help to solve this error.
Ranjeet Ranjan

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


The below documentation can guide you with resetting the MySQL root password :


by Mateusz Papiernik
Forgetting passwords happens to the best of us. If you forget or lose the **root** password to your MySQL or MariaDB database, you can still gain access and reset the password if you have access to the server and a sudo-enabled user account. In this tutorial you'll reset the root password for your MySQL or MariaDB database running on Ubuntu 18.04.