MySQL查看当前用户

时间:2015-01-05 00:20:10   收藏:0   阅读:184
技术分享
 1 mysql> select current_user();
 2 +----------------+
 3 | current_user() |
 4 +----------------+
 5 | root@localhost |
 6 +----------------+
 7 1 row in set
 8 
 9 mysql> select current_user;
10 +----------------+
11 | current_user   |
12 +----------------+
13 | root@localhost |
14 +----------------+
15 1 row in set
16 
17 mysql> select user();
18 +----------------+
19 | user()         |
20 +----------------+
21 | root@localhost |
22 +----------------+
23 1 row in set
24 
25 mysql> 
View Code

3种方式都可以

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!