How to get a current session's host(ip and port of the client) and user name in a select
I would like to know how to get the data from a 'select host, user
from INFORMATION_SCHEMA.PROCESSLIST' for only the current session.
Basically I'm trying to make a 'BEFORE INSERT ON' trigger that will
fill in fcUser and fcHost (varchar) fields of a table with the
inserter's username and host. I tried using the select above but it
returns multiple rows for people with the process privilege. I looked
around for a local variable but saw no host or user var. Did i just
miss it?
I'm using the 5.x line.
Thanks,
Tim
|