/etc/init.d/mysqld stop

/usr/bin/mysqld_safe --skip-grant-tables --user=root &

mysql -u root

Редактируем таблицы mysql.user и mysql.db

->  FLUSH PRIVILEGES;

killall mysqld

/etc/init.d/mysqld start