At 02:57 PM 4/10/2006, Kosala Atapattu wrote:
Hi people,
I have a small problem. I forgot the password for user root in my
personal MySQL instance. I'm a Linux user and running Debian Sarge on my
computer. I have few other DBs which I created and which I have access
to (still I remember the passwords) but are not having access to MySQL
database.
Is there any way to recover from this situation. If I reinitialize the
DB (somehow) how can I port my existing information back in to the
initialized DB (without exporting and importing).
Any Debian friends who can help me.
Cheers,
Kosala
--
HI Kosala,
You can try to use this documentation.
Thanks,
Ehrwin
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
MySQL: changing forgotten root password (mysqld)
Applicable to: Red Hat Linux Systems
Updated: Mar 18, 2004
This Sheet describes the procedure how to change the root password of
MySQL server.
* Stop MySQL server if its running.
* # service mysqld stop
* Check that MySQL daemon has stopped
* # ps -jef | grep mysqld
* Start MySQL as root
* # su -
* # /usr/libexec/mysqld -Sg --user=root &
* Go back into MySQL with the client:
* # mysql
* mysql> use mysql
* Now change the MySQL root password
* mysql> UPDATE user SET password=password("newpassword") WHERE
user="root"; mysql> flush privileges;
mysql> exit;
* Stop MySQL server.
* # killall mysqld
* Verify that MySQL daemon is not running
* # ps -jef | grep mysqld
* Start MySQL the normal way, and all is good. For Red Hat this is:
* # service mysqld start
* Verify if MySQL daemon is running
* # ps -jef | grep mysqld That's it.
Jett Tayer and Ehrwin Mina
Jett Tayer and Ehrwin Mina