Mysql
 sql >> Database >  >> RDS >> Mysql

Come recuperare tutti i privilegi all'utente root in MySQL?

Questo ha funzionato per me su Ubuntu:

Arresta il server MySQL:

/etc/init.d/mysql stop

Avvia MySQL dalla riga di comando:

/usr/sbin/mysqld

In un altro terminale inserisci mysql ed emetti:

grant all privileges on *.* to 'root'@'%' with grant option;

Potresti anche voler aggiungere

grant all privileges on *.* to 'root'@'localhost' with grant option;

e opzionalmente usa anche una password.

flush privileges;

e quindi esci dal prompt di MySQL e quindi uccidi il server mysqld in esecuzione in primo piano. Ricomincia con

/etc/init.d/mysql start