Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
this actually pointed me in the right direction, I enabled logging in my.cnf, restarted mysql and was able to backtrace the servers that were connecting. – Matt Bear Apr 4 '13 at 23:37
Thanks for the feeback. – Chakri Apr 11 '13 at 19:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.