How to reset MySQL root password in linux centos

To Reset your MySQL root password:
/etc/init.d/mysqld stop
mysql -u root

Use mysql;

update user set password=(“YOUR_ROOT_PW”) where User=’root’;
/usr/bin/mysqladmin -u root password 'yourmysqlpassword'

Above command can be used to reset plesk admin password as well.

flush privileges;


/etc/init.d/mysqld stop

/etc/init.d/mysqld start

mysql -u root -p


If you want to reset MySQL user password you can check How to reset MySQL user Password in Linux through command prompt.