Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MySQL root Password
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cspos
n00b
n00b


Joined: 11 Jul 2004
Posts: 60

PostPosted: Fri Jul 16, 2004 2:35 pm    Post subject: MySQL root Password Reply with quote

I set a password for the user root@localhost in MySQL 4 through Webmin. I must have typed in the wrong one: when I try to log in I get the output:
Code:
hermes etc # mysql -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

I've tried unmerging MySQL and deleting the /etc/mysql directory, but I still get the same login error. How can I wipe out this password?
Back to top
View user's profile Send private message
ultraslacker
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2002
Posts: 124
Location: lazy fairy land

PostPosted: Fri Jul 16, 2004 2:56 pm    Post subject: Reply with quote

If you have no other user with grant privileges than you will need to restart mysql with --skip-grant-tables option (add it to my.cnf).

Set password (either via webmin or command line tool mysqladmin).

Restart mysql without --skip-grant-tables.
Back to top
View user's profile Send private message
cspos
n00b
n00b


Joined: 11 Jul 2004
Posts: 60

PostPosted: Fri Jul 16, 2004 3:17 pm    Post subject: Reply with quote

I edited my.cnf and restarted MySQL, but I still can't log in through the command mysql -p or Webmin, and I need the old password to change it with mysqladmin.
Back to top
View user's profile Send private message
cspos
n00b
n00b


Joined: 11 Jul 2004
Posts: 60

PostPosted: Fri Jul 16, 2004 5:02 pm    Post subject: Reply with quote

ultraslacker wrote:
...restart mysql with --skip-grant-tables option (add it to my.cnf).


In my.cnf, the actually command is skip-grant-tables, not --skip-grant-tables. That threw me, but it works now.
Back to top
View user's profile Send private message
ultraslacker
Tux's lil' helper
Tux's lil' helper


Joined: 03 Aug 2002
Posts: 124
Location: lazy fairy land

PostPosted: Fri Jul 16, 2004 6:48 pm    Post subject: Reply with quote

--skip-grant-tables command line option get's changed to skip-grant-tables in the 4.0 my.cnf.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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