程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> 基於mysql數據庫的密碼問題詳解

基於mysql數據庫的密碼問題詳解

編輯:關於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)

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved