CURRENT_USER
デスクリプション
現在のユーザー名とそのIPルールホワイトリストを取得します。
Syntax
CURRENT_USER()
戻り値
現在のユーザー名とそのIPホワイトリストを返します。
形式:<user_name>@<ip_white_list>
例
- rootユーザー、IP制限なし
select current_user();
+----------------+
| current_user() |
+----------------+
| 'root'@'%' |
+----------------+
- dorisユーザー、IP許可リストは192.168.*
select current_user();
+---------------------+
| current_user() |
+---------------------+
| 'doris'@'192.168.%' |
+---------------------+