Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[mysql] changer le mot-de-passe du root (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 8:03 pm    Post subject: [mysql] changer le mot-de-passe du root (résolu) Reply with quote

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
View user's profile Send private message
Piaf
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2003
Posts: 76
Location: Sophia Antipolis

PostPosted: Sat Apr 23, 2005 8:12 pm    Post subject: Re: [mysql] changer le mot-de-passe de root Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 8:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Piaf
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2003
Posts: 76
Location: Sophia Antipolis

PostPosted: Sat Apr 23, 2005 8:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gentoo_Lover
l33t
l33t


Joined: 10 Jun 2004
Posts: 707
Location: ln -s France/Aquitaine/Bordeaux/ Localisation

PostPosted: Sat Apr 23, 2005 8:34 pm    Post subject: Reply with quote

as tu essayé avec Webmin ?
_________________
My fvwm desktop screen : http://romain.perier.free.fr/fvwm/fvwm-last.png

http://www.gentoofr.org
Back to top
View user's profile Send private message
Piaf
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2003
Posts: 76
Location: Sophia Antipolis

PostPosted: Sat Apr 23, 2005 8:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 9:12 pm    Post subject: Reply with quote

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 :cry:
Back to top
View user's profile Send private message
Piaf
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2003
Posts: 76
Location: Sophia Antipolis

PostPosted: Sat Apr 23, 2005 9:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sat Apr 23, 2005 9:43 pm    Post subject: Reply with quote

:cry: 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
View user's profile Send private message
blasserre
Veteran
Veteran


Joined: 10 Feb 2004
Posts: 1362
Location: Lille, Vlaanderen

PostPosted: Sat Apr 23, 2005 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
fb99
l33t
l33t


Joined: 09 Apr 2003
Posts: 998
Location: Le Locle (Suisse,Neuchâtel)

PostPosted: Sun Apr 24, 2005 5:42 am    Post subject: Reply with quote

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é :lol:

merci à vous !!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum