USER
Return the current MariaDB user. This function returns the user name and host name provided by the client upon connection.
Last updated
Was this helpful?
Was this helpful?
SELECT SUBSTRING_INDEX(USER(), '@', -1);
+----------------------------------+
| SUBSTRING_INDEX(USER(), '@', -1) |
+----------------------------------+
| 192.168.0.101 |
+----------------------------------+