基于mysql数据库的密码问题详解

中岁颇好道,晚家南山陲。兴来美独往,胜事空自知。一些风景再好,终不属于自己;有些情感,路过交错,已然是最好的结局。

今儿在做实验用到mysql数据库时,用户密码忘记了,让我也是找了半天:现在给大家介绍下我自己的方法:用到了mysql自身的函数来测试的。


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)

以上就是基于mysql数据库的密码问题详解。活在忙与闲的两种境界里,才能俯仰自得,享受生活的乐趣,成就人生的意义。更多关于基于mysql数据库的密码问题详解请关注haodaima.com其它相关文章!

您可能有感兴趣的文章
centos7安装MySQL教程

MySQL常用SQL查询语句(含复杂SQL查询)

MySQL细数发生索引失效的情况

mysqlenum字段类型的谨慎如何使用

Mysql体系化探讨令人头疼的JOIN运算