How to Set Up Root Password for Your MySQL Server

By Angsuman Chakraborty, Gaea News Network
Saturday, January 17, 2009

If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To set up a root password for the first time, use the mysqladmin command at the shell prompt as follows:

$ mysqladmin -u root password newpass

If you want to change (or update) a root password, then you need to use the following command:

$ mysqladmin -u root -p oldpassword newpass

I hope this will work for you perfectly.

Filed under: How To, MySQL

Tags: , ,
Discussion

Ryan
February 3, 2010: 7:44 pm

Thank-you this worked a treat :-)

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :