CURRENT_USER
Descriptionβ
Get the current username and its IP rule whitelist.
Syntaxβ
CURRENT_USER()
Return Valueβ
Returns the current username and its IP whitelist.
Format:<user_name>@<ip_white_list>
Examplesβ
- root user, no IP restrictions
select current_user();
+----------------+
| current_user() |
+----------------+
| 'root'@'%' |
+----------------+
- doris user, IP whitelist is 192.168.*
select current_user();
+---------------------+
| current_user() |
+---------------------+
| 'doris'@'192.168.%' |
+---------------------+