Follow from step by step:
service mysql-server stop
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql
update user set password=PASSWORD('YOUR PASSWORD HERE') where user='root' and host='%';
flush privileges;
quit
service mysql-server restart
Now you can login with root
If you can't login with root user then maybe the root user is renamed.
You can list exist users with this SQL command:
SELECT user,host FROM user;
service mysql-server stop
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql
update user set password=PASSWORD('YOUR PASSWORD HERE') where user='root' and host='%';
flush privileges;
quit
service mysql-server restart
Now you can login with root
If you can't login with root user then maybe the root user is renamed.
You can list exist users with this SQL command:
SELECT user,host FROM user;


