• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Change MySQL Password

October 8, 2015

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

Login to MySQL and access MySQL table.

mysql -u root -p
use mysql;

mysql -u root -p use mysql;

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

update user set password=PASSWORD('new_password') where User='root';
flush privileges;
quit

update user set password=PASSWORD('new_password') where User='root'; flush privileges; quit

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

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

Filed Under: Linux, WP Tagged With: mysql, password, root

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023