We have Ubuntu 11.10 server that is running a LAMP stack, it was set up before I got here and no one knows what its for. I have to migrate it, or just shut it down but I need to know what its doing first.
Digging through it, there are no sites hosted off of it however there several databases created in MySQL.
So it may be connected to one of our sites but none of the devs here know.
What I need to do is view connection history on the MySQL databases do that I can find what, if anything, is connecting to them.
I am monitoring the processlist and not seeing any active connections.
Mysql login logs can be enabled by starting mysql server with the option --log="log-file" option.
/usr/bin/safe_mysqld --log="/var/lib/mysql/mysql.log" &
Mysql log will be logged inside the file /var/lib/mysql/mysql.log. tail this file to see the logs. To see only the login (connect log) use the following command
grep Connect /var/lib/mysql/mysql.log