I have found a much simpler way to reset the password which does not require you to delete the root user...
http://www.crossdb.com/dbknowledgebase/mysql.html Travis ---- Original Message ---- From: Steve Werby <[EMAIL PROTECTED]> Sent: 2001-12-03 08:06:09.0 To: [EMAIL PROTECTED] Subject: Re: [cobalt-developers] Resetting MySQL password / forgotten MySQL password [was: MySQL] "Kevin M Carolan" <[EMAIL PROTECTED]> wrote: > That's where I messed up and put a new password in there. How do I get rid > of it and run your command. Kevin, I usually point people to a post of mine from 1999, but one of the steps needs to be corrected so for your benefit and the benefit of those searching the archives here's the full edited version. 1. From a shell prompt type "ps aux | grep mysql" to find the MySQL daemon's PID (number in 2nd column). 2. From a shell prompt type "kill -9 PID" to kill MySQL. 3. Repeat step 1 to ensure that MySQL is killed. 4. From the shell prompt type "mysqld --safemode -Sg &" to start MySQL bypassing the grant tables. 5. Type "mysql -u root" or "path_to/mysql -u root" if the mysql binary is not in your PATH. 6. mysql> use mysql; [opens mysql db] 7. mysql> delete from user where user='root' [deletes user "root" from usertable] 8. mysql> show fields from "user"; and count the # of fields that take a value of "Y" or "N" 9. mysql> insert into user values ("localhost","root",PASSWORD("mypassword"),"Y","Y",..,"Y") [enter "Y" the # of times from above - it is 14 in my version 3.23.x of MySQL] 10. Repeat step 9 replacing "localhost" with "%" if you want to allow user "root" to access MySQL from other machines. I STRONGLY URGE AGAINST THIS FOR SECURITY REASONS! 11. Write your password down somewhere safe or put it in a password protected file somewhere safe. 12. mysql> flush privileges; [updates MySQL privileges to put new root user and password into effect] 13. mysql> exit 14. Type "mysqladmin -u root -p shutdown" to shutdown MySQL or follow steps 1-2 if you prefer. 15. Restart MySQL by typing "safe_mysqld &" or whatever other method you are used to. Here are some old posts of mine if you need more detail. I don't know that there will be any more detail, but you might gleam some from the other messages in the threads. http://list.cobalt.com/pipermail/cobalt-users/1999-November/000155.html http://marc.theaimsgroup.com/?l=cobalt-users&m=99343077721320 http://marc.theaimsgroup.com/?l=cobalt-users&m=96579373809030 -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ _______________________________________________ cobalt-developers mailing list [EMAIL PROTECTED] http://list.cobalt.com/mailman/listinfo/cobalt-developers _______________________________________________ cobalt-developers mailing list [EMAIL PROTECTED] http://list.cobalt.com/mailman/listinfo/cobalt-developers