MySQL查看当前用户
时间:2022-03-14 04:34
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种方式都可以