Ok, I found a solution:
USER ()
[EDIT]
Attention:
MySQL stores the values userand hostin accordance with the setting of UTF8-BIN after lowering them and USER()returns without lowering.
For example, USER()return gqyy@MyTinnyHost-PC.localwhen MySQL saved gqyyandmytinnyhost-pc.local
( # 60166) , a SUBSTRING_INDEX() a LOWER() USER(),
:
mysql> SET @user_at_host = 'gqyy@mytinyhost-PC.local';
Query OK, 0 rows affected (0,00 sec)
mysql> SELECT LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1));
+------------------------------------------------+
| LOWER(SUBSTRING_INDEX(@user_at_host, '@', -1)) |
+------------------------------------------------+
| mytinyhost-pc. ocal |
+------------------------------------------------+
1 row in set (0,00 sec)