基于mysql數(shù)據(jù)庫的密碼問題詳解
今兒在做實驗用到mysql數(shù)據(jù)庫時,用戶密碼忘記了,讓我也是找了半天:現(xiàn)在給大家介紹下我自己的方法:用到了mysql自身的函數(shù)來測試的。
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)
相關(guān)文章
mysql遞歸函數(shù)with?recursive的用法舉例
在實際開發(fā)的過程中,我們會遇到一些數(shù)據(jù)是層級關(guān)系的、要展示數(shù)據(jù)子父級關(guān)系的時候,下面這篇文章主要給大家介紹了關(guān)于mysql遞歸函數(shù)with?recursive的用法舉例,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2022-08-08
MySql官方手冊學(xué)習(xí)筆記1 MySql簡單上手
這是我學(xué)習(xí)MySql 5.1時做的一些整理與筆記,希望能理一理自己學(xué)到的東西,如果能有助于各位同道學(xué)習(xí)MySql那就更是意外之喜了,呵呵2012-10-10

