Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Thanks

share|improve this question
    
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
add comment

migrated from stackoverflow.com Jul 26 '12 at 1:11

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

4 Answers

Execute following query with root user login to MySQL:

SHOW FULL PROCESSLIST;

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

share|improve this answer
add comment

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
add comment

You can use the following query:

show processlist;
share|improve this answer
add comment

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

See http://dev.mysql.com/doc/refman/5.6/en/host-cache-table.html

share|improve this answer
add comment

Your Answer

 
discard

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