I've followed these steps exactly, taken from the documentation. But one
step is funky. See my comments below for anyone who has had this problem:
---
1.Take down the mysqld server by sending a kill (not kill -9) to the
mysqld server. The pid is stored in a .pid file, which is normally in
the MySQL database directory:
kill `cat /mysql-data-directory/hostname.pid`
You must be either the Unix root user or the same user the server runs
as to do this.
---
This worked fine.
---
2.Restart mysqld with the --skip-grant-tables option.
---
This worked.
---
3.Connect to the mysqld server with mysql -h hostname mysql and change
the password with a GRANT command. See section 7.34 GRANT and REVOKE
Syntax. You can also do this with mysqladmin -h hostname -u user
password 'new password'
---
"mysql -h localhost mysql" worked fine but:
mysql> GRANT ALL ON *.* TO root@localhost IDENTIFIED BY "test";
That didn't work. I got "ERROR 1047: Unknown command"
However, someone suggested doing "flush privileges". Then,
mysql> GRANT ALL ON *.* TO root@localhost IDENTIFIED BY "test";
was allowed, but 0 rows were reported affected. That doesn't seem to
matter though, but the message is kinda wierd.
---
4.Load the privilege tables with: mysqladmin -h hostname
flush-privileges or with the SQL command FLUSH PRIVILEGES.
---
Even though the previous step didn't seem to work right, I did this
anyway. Still, 0 rows were reported to be affected. Don't worry about
it. Then, I killed the running mysqld processes (you can find the
process id by using "ps aux | grep mysqld") and restarted the server
with safe_mysqld. I was then able to connect to the server with my new
root password.
-Neil
Michael Ridinger wrote:
>
> Just restart MySQL with the skip grant table options.
>
> Reset the password in the grant tables and then restart the server...
> that's it!
>
> Michael Ridinger
>
> At 03:45 PM 1/4/01 +0100, you wrote:
> >Hi Folkz,
> >
> >
> >I run a MySql database on a Suse Linux system, however I forgot the root
> >password?
> >Newbee (:-(
> >Is there a possibility to change a remove this password?
> >
> >
> >
> >thanx saber....
> >
> >
> >--
> >---------------------------------------------------------------------
> >Please check "http://www.mysql.com/documentation/manual.php" before
> >posting. To request this thread, e-mail mysql-thread60644@stripped
> >
> >To unsubscribe, send a message to:
> > <mysql-unsubscribe-mjriding=wcoil.com@stripped>
> >
> >If you have a broken mail client that cannot send a message to
> >the above address (Microsoft Outlook), you can use:
> > http://lists.mysql.com/php/unsubscribe.php
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/documentation/manual.php" before
> posting. To request this thread, e-mail mysql-thread60680@stripped
>
> To unsubscribe, send a message to:
> <mysql-unsubscribe-ncurri=fastcompany.com@stripped>
>
> If you have a broken mail client that cannot send a message to
> the above address (Microsoft Outlook), you can use:
> http://lists.mysql.com/php/unsubscribe.php