I know it's weird to ask this question, but I'm looking for a way to get the OS USER
in MySQL
; not the schema user or the device name.
For instance; in oracle
, you can get the OS USER
using:
SELECT SYS_CONTEXT('USERENV', 'OS_USER') FROM DUAL;
-- it returns n.awad for example
In MYSQL
I found these statements, but none of them returns the required value:
SELECT USER();
-- it returns schemaUser@deviceName
SELECT CURRENT_USER();
-- it returns schemaUser@%
SELECT HOST FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State ='executing';
-- it returns deviceName:port
So, is there any function that returns the required value?