It often happens so that administrator’s password for MySQL is lost or forgotten. The easiest way to fix the problem is to open /var/lib/mysql/mysql/user.MYD in hex editor and replace the encrypted string near “localhost root” with spaces. Then mysql service should be restarted, and that’s it.