Turn off --skip-grant-tables in MySQL

Login to mysql

 mysql -u root -p

Then execute:


http://dev.mysql.com/doc/refman/5.0/en/server-options.html http://dev.mysql.com/doc/refman/5.0/en/mysqladmin.html

Just stop and restart MySQL normally.

You can make this done by using below steps.

[root@backups1 mysql5.7]# bin/mysqld_safe --skip-grant-tables --user=mysql

connect to your mysql without password.

mysql> flush privileges;
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '';
mysql> flush privileges;

switch to normal mode of mysql then connect without password.

This surely will work for you.