mysql5.5的一些函式_user()_current_user()

wisdomone1發表於2010-06-21

mysql> SELECT USER();
+----------------------+
| USER()               |
+----------------------+
| yisile@192.168.2.213 |
+----------------------+
1 row in set (0.00 sec)

mysql> seLECT User();
+----------------------+
| User()               |
+----------------------+
| yisile@192.168.2.213 |
+----------------------+
1 row in set (0.00 sec)

mysql> select current_user();
+----------------+
| current_user() |
+----------------+
|        |
+----------------+
1 row in set (0.01 sec)

mysql> select current_user();
+----------------+
| current_user() |
+----------------+
|        |
+----------------+
1 row in set (0.00 sec)

mysql> select database();
+------------+
| database() |
+------------+
| NULL       |
+------------+
1 row in set (0.00 sec)

mysql> use yisile;
Database changed
mysql> select database();
+------------+
| database() |
+------------+
| yisile     |
+------------+
1 row in set (0.00 sec)

mysql> use mysql;
Database changed
mysql> select database();
+------------+
| database() |
+------------+
| mysql      |
+------------+
1 row in set (0.00 sec)

mysql> select version();
+------------------------+
| version()              |
+------------------------+
| 5.5.0-m2-community-log |
+------------------------+
1 row in set (0.00 sec)

mysql> select session_user(),system_user();
+----------------------+----------------------+
| session_user()       | system_user()        |
+----------------------+----------------------+
| yisile@192.168.2.213 | yisile@192.168.2.213 |
+----------------------+----------------------+
1 row in set (0.00 sec)

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-665807/,如需轉載,請註明出處,否則將追究法律責任。

相關文章