Changer un password root MySQL via SSH

Connectez-vous en SSH root et tapez ceci :
# mysql -u root mysql
Vous verrez un message :
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is *** to server version: ****

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql>

Ensuite tapez ceci : Pensez à modifier nouveau_mot_de_passe !
mysql> UPDATE user SET password=PASSWORD('nouveau_mot_de_passe') WHERE User="root" AND Host="localhost";
mysql> FLUSH PRIVILEGES;

Pour quitter tapez "exit".

Commentaires

Posts les plus consultés de ce blog

Comment mettre l'État de démarrage sécurisé sur ON (Secure Boot) (pour BF6 par exemple)

[HOW-TO] Ouvrir les ports pour TDU2 - Test Drive Unlimited 2

Comment crafter des colorants sur ARK : Survival Evolved