J. Cornelius

Change MySQL root password

June 5, 2004 - 01:34:51 AM

This is the 'hands-on' way of changing the root password for your MySQL server. Get to a command prompt on the MySQL server and enter the following commands:

mysql -u root mysql > UPDATE user SET password=password('secret') WHERE user='root'; > flush privileges;

This should reset the password for you and then you can log in and get some real work done.

Tags

administration, mysql

About

J Cornelius is a software developer, Web developer, and Formula 1 fan in Atlanta GA. He has a strange affinity for odd numbers, european sports cars, thoughtful analogies, and is hopelessly addicted to chips & salsa. Read more