Felizmente, em sistemas Debian e derivados, existe um outro usuário super poderoso, o debian-sys-maint e a senha de acesso a esta conta está no arquivo /etc/mysql/debian.cnf
Então:
Código: Selecionar todos
mysql -u debian-sys-maint -p
Enter password:
Código: Selecionar todos
grant all privileges on *.* to 'root'@'localhost' identified by 'SENHADOUSUARIOROOT' with grant option
