View previous topic :: View next topic |
Author |
Message |
cspos n00b
Joined: 11 Jul 2004 Posts: 60
|
Posted: Fri Jul 16, 2004 2:35 pm Post subject: MySQL root Password |
|
|
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 |
|
|
ultraslacker Tux's lil' helper
Joined: 03 Aug 2002 Posts: 124 Location: lazy fairy land
|
Posted: Fri Jul 16, 2004 2:56 pm Post subject: |
|
|
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 |
|
|
cspos n00b
Joined: 11 Jul 2004 Posts: 60
|
Posted: Fri Jul 16, 2004 3:17 pm Post subject: |
|
|
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 |
|
|
cspos n00b
Joined: 11 Jul 2004 Posts: 60
|
Posted: Fri Jul 16, 2004 5:02 pm Post subject: |
|
|
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 |
|
|
ultraslacker Tux's lil' helper
Joined: 03 Aug 2002 Posts: 124 Location: lazy fairy land
|
Posted: Fri Jul 16, 2004 6:48 pm Post subject: |
|
|
--skip-grant-tables command line option get's changed to skip-grant-tables in the 4.0 my.cnf. |
|
Back to top |
|
|
|