MYSQL CHANGE – RESET USER PASSWORD

Login to Mysql with an authorized user.

> mysql -u root -p

If more than one database exists, it can be listed with the following command.

> show databeses;

Then the database where the user is located is selected.

> use “database_name”;

The following command also lists the tables in the database.

> show tables;

You can list the fields in the table with the following command.

> describe “tables_name”;

You can use the following command to see all the data in the table.

> select * from “tables_name”\G;

Or you can call up the data by customizing it as follows.

> select * from wp_users where ID=1;

Now let’s reset the password of the user concerned.

> UPDATE wp_users SET user_pass=MD5(‘123456’) where ID = 1;

NOTE: Clear text outgoing password should be deleted from “vim ~ / .mysql_history” file.

I hope it has been a useful article.