HPCHOST

Client Login Client Login

Changing a forgotten mysql root password

To change the MySQL root password, run the following commands:

# /etc/init.d/mysql stop
# killall -9 mysql
# /etc/init.d/mysql --skip-grant-tables --user=root start

Connect to mysql with the following command:

# mysql -u root

Issue the following command in the mysql client:

# UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';

Replace 'newpwd' with the new root password.



Was this answer helpful?

Add to Favourites
Print this Article

Also Read
The VI Editor (Views: 166)



Close Chat
HPC Host Live Chat