Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql password issue [SOLVED - KINDA]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Beetle B.
Guru
Guru


Joined: 01 Mar 2003
Posts: 507

PostPosted: Sat Jun 30, 2012 5:26 pm    Post subject: mysql password issue [SOLVED - KINDA] Reply with quote

At some point in the past, the MySql server won't let me log in. If I do:

Code:

mysqldump --add-drop-table -h localhost -u root --password='mypass' somedb > somefile


It says:

Code:

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect


It used to work in the past. In fact, I can log in with that password using phpMyAdmin.

It stopped working in the middle of February. The last time I updated mysql was in December. I suppose it's possible I didn't reboot till February. Is there any log of my reboots somewhere...?

Ideas?
_________________
Beetle B.

Please update the table of equivalents.
A Firefox guide.


Last edited by Beetle B. on Tue Jul 03, 2012 4:35 am; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5263

PostPosted: Mon Jul 02, 2012 1:54 pm    Post subject: Reply with quote

You can log into MySQL at a prompt, right? Try re-setting root's right by doing

Code:

grant all privileges on *.* to root@'localhost' identified by 'password';

_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
Beetle B.
Guru
Guru


Joined: 01 Mar 2003
Posts: 507

PostPosted: Tue Jul 03, 2012 4:35 am    Post subject: Reply with quote

Your command didn't work.

phpMyAdmin shows that root has all the privileges:

http://i.imgur.com/4R0zk.png

In any case, I just modified the command to use the user of that DB and it worked.
_________________
Beetle B.

Please update the table of equivalents.
A Firefox guide.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5263

PostPosted: Tue Jul 03, 2012 12:56 pm    Post subject: Reply with quote

Whatever works, right? 8)
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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