Modifica di una password root MySQL dimenticata
Per modificare la password root MySQL, utilizza la seguente procedura:
-
Esegui questi comandi:
# /etc/init.d/mysqld stop
# mysqld_safe --skip-grant-tables --skip-networking
-
Collegati a MySQL con il seguente comando:
# mysql -u root
-
Immetti il seguente comando nel client MySQL:
# UPDATE mysql.user SET Password=PASSWORD('newpassword') WHERE User='root';
-
Sostituire
newpassword
con la nuova password root. -
Riavvia il server MySQL utilizzando il seguente comando:
# /etc/init.d/mysqld start