MYSQL CHANGE – RESET USER PASSWORD
Login to Mysql
with an authorized user.
1 | > mysql -u root -p |
If more than one database exists, it can be listed with the following command.
1 | > show databeses; |
Then the database where the user is located is selected.
1 | > use “database_name”; |
The following command also lists the tables in the database.
1 | > show tables; |
You can list the fields in the table with the following command.
1 | > describe “tables_name”; |
You can use the following command to see all the data in the table.
1 | > select * from “tables_name”\G; |
Or you can call up the data by customizing it as follows.
1 | > select * from wp_users where ID=1; |
Now let’s reset the password of the user concerned.
1 | > 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.