The following are instructions on how to change your MySQL password from the Unix command line.

Login to MySQL and access MySQL table.

<pre lang="bash">
mysql -u root -p
use mysql;

Change the password for any user, flush privileges and quit.

<pre lang="bash">
update user set password=PASSWORD('new_password') where User='root';
flush privileges;

Make sure to make password changes on your applications as well.

In WordPress, edit the wp-config.php file to change database password.