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

I need some utility which monitors which host are trying to connect my mysql server. Bascially i want all details of the users/host which are connected to mysql server OR even attempted to connect.


share|improve this question

migrated from Jul 26 '12 at 1:11

This question came from our site for professional and enthusiast programmers.

You mean, a firewall? – eggyal Jul 25 '12 at 12:26
you can enable your DB tracking for that – Ajay Kadyan Jul 25 '12 at 12:27
not an firewall. i want to kind of monitor tool / script anything which shows the users/host connected to mysql server or even attempted to connect with incorrect credentials – Dell Jul 25 '12 at 12:29
@AjayKadyan Can you give more details regarding "enable your DB tracking" . i had google but didnt find such – Dell Jul 25 '12 at 12:34

Starting with MySQL 5.6, the performance_schema.host_cache table shows all the details you are looking for.


share|improve this answer

Execute following query with root user login to MySQL:


This will give you details of all connections made to MySQL server.

share|improve this answer

You can look at JetProfiler. They have free version with lots of features.

If you want to do via mysql command line then you can use answers provided by Omesh or Amrita.

Hope this help !

share|improve this answer

You can use the following query:

show processlist;
share|improve this answer

Your Answer


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