#service mysql stopWhen we made sure that the mysql daemon is stopped we need to start the mysql but skipping the grant tables where mysql stores the passwords:
#mysqld_safe --skip-grant-tablesYou should see the mysql start successfully. One a side note this command will run in the forground therefore any new command will have to be executed in a new shell. Now you should be able to connect to your mysql database without root password
#mysql -u rootOnce connected to the database you can update the password running the following commands in the mysql shell:
mysql> update user set Password=PASSWORD('new-password') where user='root'; mysql> flush privileges; mysql> exitNow it’s time to kill your current mysql daemon and start the mysql normally.
#killall -9 mysqld_safe #service mysql start
You can actually try these commands on our platform in few minutes utilizing our PCS (Private Cloud Solution) which allows you to have VPSie(s) on a private network – NAT – Port forward – traffic control for inbound and outbound – multiple gateway IPs which you could use for the load-balancing and failover.