How to get the port of a connection in mysql I can do:
select * from information_schema.processlist plist where id=connection_id();

To get the data from the current connection I am on, this will give me something that looks like:
# ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO
'6558851', 'avails', '99-29.lit:55353', 'aQvails', 'Query', '0', 'executing', 'select * from information_schema.processlist plist where id=connection_id()'

And the port in there is 55353. Is there a way to grab the port directly, for example something like:
SELECT connection_id(), user(), port_id(??)
You should be able to use one of the solutions in this StackOverflow: How do I find out my MySQL URL, host, port and username?
Specifically I think this is what you're looking for: SHOW VARIABLES WHERE Variable_name = 'port';