List:General Discussion« Previous MessageNext Message »
From:Egor Egorov Date:August 23 2004 12:13pm
Subject:Re: Root password lost?; can't manage existing database...
View as plain text  
"DBS" <help@stripped> wrote:
> I have a problem, It's been months since I used MySQL and (I believe) I had
> set it up with a root password.  Now I can't log on to MySQL as root MySQL
> user and create a new user or manage an existing user (I can log onto server

Familiar situation. :) 

Do so: 

	service mysql stop

wait until MySQL shuts down. Then run 

	mysqld_safe --skip-grant-tables &

then you will be able to login as root with no password. 

	mysql -uroot mysql 

In MySQL command line prompt issue the following command: 

	UPDATE user SET password=PASSWORD("abcd") WHERE user="root"; 
	FLUSH PRIVILEGES;

At this time your root password is reset to "abcd" and MySQL will now 
know the privileges and you'll be able to login with your new password:

	mysql -uroot -pabcd mysql 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   Egor.Egorov@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



Thread
Root password lost?; can't manage existing database...DBS23 Aug
  • RE: Root password lost?; can't manage existing database...Peter Lovatt23 Aug
  • Re: Root password lost?; can't manage existing database...Egor Egorov23 Aug