« Changer le mot de passe mysql » : différence entre les versions

Aller à la navigation Aller à la recherche
m
<syntaxhighlight lang="mysql" line="line">
m (<syntaxhighlight lang="mysql" line="line">)
 
(Une version intermédiaire par un autre utilisateur non affichée)
Ligne 16 : Ligne 16 :
Dans une autre console, accédez à MySql (sans mot de passe...)
Dans une autre console, accédez à MySql (sans mot de passe...)


# mysql -u root
<syntaxhighlight lang="mysql" line="line">
Welcome to the MySQL monitor.  Commands end with ; or \g.
# mysql -u root
Your MySQL connection id is 1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Server version: 5.1.49-3 (Debian)
Your MySQL connection id is 1
Server version: 5.1.49-3 (Debian)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR root@'localhost' = PASSWORD('votre_nouveau_mot_de_passe');
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye


Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR root@'localhost' = PASSWORD('votre_nouveau_mot_de_passe');
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
</syntaxhighlight>
Redémarrez MySql en mode "normal":
Redémarrez MySql en mode "normal":


Ligne 45 : Ligne 46 :
Faites un test avec le nouveau mot de passe:
Faites un test avec le nouveau mot de passe:


# mysql -u root -p
<syntaxhighlight lang="mysql" line="line">
Enter password:  
# mysql -u root -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Enter password:  
Your MySQL connection id is 88
Welcome to the MySQL monitor.  Commands end with ; or \g.
Server version: 5.1.49-3 (Debian)
Your MySQL connection id is 88
Server version: 5.1.49-3 (Debian)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
and you are welcome to modify and redistribute it under the GPL v2 license
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
 
Bye
mysql> exit
Bye
</syntaxhighlight>


Voilà!
Voilà!
Ligne 69 : Ligne 72 :


[[Utilisateur:Lol|Lol]] 22 janvier 2012 à 06:38 (CET)
[[Utilisateur:Lol|Lol]] 22 janvier 2012 à 06:38 (CET)
[[Catégorie:Trucs_et_Astuces_divers]]
[[Catégorie:Trucs_et_Astuces]]
editor
621

modifications

Menu de navigation