How do I set my Mysql root password?



i have installed mysqld on my linux box. What is the way to set my mysql root password?



You can set your mysql root password using the following command on your linux shell:

mysqladmin -u root password newpassword

You can reset your old mysql root password using the shell command:

mysqladmin -u root -p oldpassword newpassword