View previous topic :: View next topic |
Author |
Message |
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 8:03 pm Post subject: [mysql] changer le mot-de-passe du root (résolu) |
|
|
j'ai installé mysql mais je n'arrive pas à spécifier de mot de passe pour root pourtant j'ai bien fait
Code: |
gentoo-linux # mysql_install_db
|
mais quand chager le mot de passe j'ai ça
Code: |
gentoo-linux www # mysql -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
|
Qu'est ce que j'ai bein pu oublié ??
merci d'avance pour votre aide
Last edited by fb99 on Sun Apr 24, 2005 5:43 am; edited 1 time in total |
|
Back to top |
|
|
Piaf Tux's lil' helper
Joined: 03 Aug 2003 Posts: 76 Location: Sophia Antipolis
|
Posted: Sat Apr 23, 2005 8:12 pm Post subject: Re: [mysql] changer le mot-de-passe de root |
|
|
Il me semble qu'il faut mettre l'option -p pour pouvoir saisir un password:
Code: | $ mysql -u root -p
Enter password: |
_________________ Est-ce que c'est toi John Wayne, ou est-ce que c'est moi... |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 8:17 pm Post subject: |
|
|
excuse moi j'ai oublié de le spécifier mais j'ai bien mis un -p j'ai aussi essayé en spécifiant le hostname mais j'ai toujours le meme problème |
|
Back to top |
|
|
Piaf Tux's lil' helper
Joined: 03 Aug 2003 Posts: 76 Location: Sophia Antipolis
|
Posted: Sat Apr 23, 2005 8:19 pm Post subject: |
|
|
As-tu fait:
Code: | # mysqladmin -u root password 'nouveau-password' |
_________________ Est-ce que c'est toi John Wayne, ou est-ce que c'est moi... |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 8:21 pm Post subject: |
|
|
oui j'avais essayé et j'ai cette erreur
Code: |
gentoo-linux www # mysqladmin -u root password avion -h gentoo-linux
mysqladmin: connect to server at 'gentoo-linux' failed
error: 'Access denied for user: 'root@gentoo-linux' (Using password: NO)'
|
meme chose sans spécifier l'host |
|
Back to top |
|
|
Gentoo_Lover l33t
Joined: 10 Jun 2004 Posts: 707 Location: ln -s France/Aquitaine/Bordeaux/ Localisation
|
|
Back to top |
|
|
Piaf Tux's lil' helper
Joined: 03 Aug 2003 Posts: 76 Location: Sophia Antipolis
|
Posted: Sat Apr 23, 2005 8:58 pm Post subject: |
|
|
humm... doit y avoir un vieux-mot-de-passe-pourri enregistré...
Le plus simple c'est de redémarrer temporairement le serveur mysql sans la prise en charge de l'authentification, ce qui fait que n'importe qui peut se connecter :
Code: | # /etc/init.d/mysql stop |
puis :
Code: | # mysqld --skip-grant-tables |
et dans un autre terminal :
Code: | # mysqladmin -u root password 'nouveau-password' |
enfin arreter le serveur mysql avec un kill (attention le fichier mysqld.pid est peut-etre ailleurs...) et le relancer normalement
Code: | # kill `cat /var/run/mysqld/mysqld.pid`
# /etc/init.d/mysql start |
En théorie, ca devrait marcher.... (euh j'ai pas vraiment testé... ) _________________ Est-ce que c'est toi John Wayne, ou est-ce que c'est moi... |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 9:09 pm Post subject: |
|
|
Quote: |
et dans un autre terminal :
Code:
# mysqladmin -u root password 'nouveau-password'
|
il me réponds quand j'essaie de faire ça
Code: |
gentoo-linux ~ # mysqladmin -u root password 'test'
mysqladmin: unable to change password; error: 'You must have privileges to update tables in the mysql database to be able to change passwords for others'
|
|
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 9:12 pm Post subject: |
|
|
et pour webmin j'ai le meme problème vu que je n'arrive pas à spécifier le mot de passe de l'administrateur mysql |
|
Back to top |
|
|
Piaf Tux's lil' helper
Joined: 03 Aug 2003 Posts: 76 Location: Sophia Antipolis
|
Posted: Sat Apr 23, 2005 9:28 pm Post subject: |
|
|
fb99 wrote: |
il me réponds quand j'essaie de faire ça
Code: |
gentoo-linux ~ # mysqladmin -u root password 'test'
mysqladmin: unable to change password; error: 'You must have privileges to update tables in the mysql database to be able to change passwords for others'
|
|
Damned !
et si, à la place de
Code: | # mysqladmin -u root password 'nouveau-password' |
tu fait :
Code: | # mysql -u root mysql |
arrives-tu à avoir accès à la base ?
si oui, un petit :
Code: | mysql> UPDATE user SET Password=PASSWORD('nouveau-password') WHERE User='root';
mysql> FLUSH PRIVILEGES; |
devrait permettre de changer le mot de passe...
et puis bien sur pour finir :
Code: |
# kill `cat /var/run/mysqld/mysqld.pid`
# /etc/init.d/mysql start
|
_________________ Est-ce que c'est toi John Wayne, ou est-ce que c'est moi... |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sat Apr 23, 2005 9:43 pm Post subject: |
|
|
ca ne passe pas avec mysql -u root mysql j'ai toujour
Code: |
gentoo-linux Maburaho complet # mysql -u root mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
gentoo-linux Maburaho complet # mysql -u root mysql -h gentoo-linux
ERROR 1045: Access denied for user: 'root@gentoo-linux' (Using password: NO)
|
|
|
Back to top |
|
|
blasserre Veteran
Joined: 10 Feb 2004 Posts: 1362 Location: Lille, Vlaanderen
|
Posted: Sat Apr 23, 2005 9:59 pm Post subject: |
|
|
t'es sur que le mot de passe est pas passé la première fois ?
auquel cas il faut que tu le spécifie pour ajouter/modifier les mdp
(ajouter -p à la commande) _________________ benj
technicien professionnel, ascendant winner |
|
Back to top |
|
|
fb99 l33t
Joined: 09 Apr 2003 Posts: 998 Location: Le Locle (Suisse,Neuchâtel)
|
Posted: Sun Apr 24, 2005 5:42 am Post subject: |
|
|
Je sais pas pourquoi ca voulait pas passer
mais, devenant fou, j'ai reémerger mysql: la command mysqladmin ne fonctionnait toujours pas pas par contre se connecter à la base et modifier le mot-de-passe à la main ça, ça à marché
merci à vous !! |
|
Back to top |
|
|
|