Add Skip-Grant-Tables and restart your mysqld, then there is no password so long. Then enter mysql, update mysql.user set password = password ('password') where user = 'root' After success, Flush Privileges; finally removes Skip-grant-tables in My.cnf to restart mysqld