今儿在做实验用到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)
Ubuntu MySQL 安装和用户登录Oracle 禁止操作系统认证登录相关资讯 MySQL数据库教程
- MySQL 处理非法数据 (04/09/2013 08:06:28)
- MySQL关于timestamp和mysqldump的 (12/16/2012 13:25:41)
- MySQL保证数据完整性 (12/16/2012 12:00:35)
| - ERROR 1130: mysql 1130连接错误的 (12/16/2012 13:29:08)
- MySQL数据库教程:管理数据库和表( (12/16/2012 12:47:02)
- MySQL快速插入大批量数据存储过程 (11/05/2012 19:04:04)
|
本文评论 查看全部评论 (0)