How to map a MySQL session ID to an user/IP

Hello all,

Sorry if this was asked before, I’ve searched around but could not find
anything.

We have an older RT install, running 3.4.5 on Mysql 4.1.11.
Lately, there are some users running long queries (mainly some full content
searches) that bog down the machine. When that happens, we use mytop to see
the sessions and the SQL being run, but that lists a MySQL session ID, not
a particular user/IP.

We usually kill the offending session, but I would like to track down the
users, since sometimes they just keep doing it…

Is there any way we can map that particular MySQL session ID to an IP or an
RT user ?

Francisco Amaro
Email: famaro@gmail.com

Is there any way we can map that particular MySQL session ID to an IP or an RT
user ?

Since nobody connects directly to mysql, there’s no connection from
the session ID to an IP (or an RT user).

You can look for very large session blobs and use rt-session-viewer to
look inside them and see what query was run to generate them (since on
your old and unsupported version of RT, RT stores full ticket lists in
the sessions, this will find queries that return lots of tickets).

If you upgrade to 4.2, you can have indexed full text search.

-kevin