Post Reply  Post Thread 
Reset MySQL root password :
Author Message
Shital
Junior Member
**


Posts: 5
Group: Registered
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
0 was given thank in 0 posts
Post: #1
Reset MySQL root password :

Reset MySQL root password :

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

==============================================================



ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

02-14-2008 10:31 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  MySQL 5.0 backup from java sanjay_sharma77 2 308 06-07-2008 05:10 PM
Last Post: digz6666
  Top best 84 MySql Performance tips! admin 0 350 12-11-2007 07:02 PM
Last Post: admin
  MySql Backup and restoring backup from Command Line admin 0 333 09-28-2007 11:16 PM
Last Post: admin
  10 tips for optimizing mysql queries admin 0 219 07-31-2007 07:53 PM
Last Post: admin

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: