When I used the mysql database in my experiment today, I forgot my password and asked me to find it for a long time. Now I want to introduce my own method: I used mysql functions for testing.
Copy codeThe Code is as follows:
Mysql> select user, password, host from user;
+ ------ + ------------------ + ----------- +
| User | password | host |
+ ------ + ------------------ + ----------- +
| Root | 773359240eb9a1d9 | localhost |
| Root | fsailing1 |
| Root | 127.0.0.1 |
| Root | 309e1248634a4f61 | % |
+ ------ + ------------------ + ----------- +
4 rows in set (0.00 sec)
Mysql> password ("root ");
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'password ("root ") 'At line 1
Mysql> select password ("root ");
+ ------------------ +
| Password ("root") |
+ ------------------ +
| 67457e226a1a15bd |
+ ------------------ +
1 row in set (0.00 sec)
Mysql> select password ("chen ");
+ ------------------ +
| Password ("chen") |
+ ------------------ +
| 309e1248634a4f61 |
+ ------------------ +
1 row in set (0.00 sec)