Tuesday, July 16, 2013

Obvious For Some - How to tail log for connections on port, CentOS?

This may be obvious to a lot of users out there, but I am making myself a note.
Mostly because I am more likely to remember if I make a note!



tail -f /var/log/messages  |grep "DPT=3306"
This tails the messages log for any connection to port 3306, typically MySQL.
It is a handy way to see what IPs are connecting to MySQL.