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.

How can I check on my MySQL server the follow:

  1. what accounts have an open connection to the mysql-server ?

  2. how often they request a new connection ?

  3. how many requests they usually do per connection ?


It would be nice if I could aswell identify the codes that are making the calls aswell like, let's say:

/home/domainX/public_html/db.pl or /home/domainX/public_html/index.php

I guess this last part is only available if it is a socket call right ?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

what accounts have an open connection to the mysql-server ?

mysqladmin processlist

how often they request a new connection ?

Not sure - try the General Query log - but I suspect it may not record connections - only queries

how many requests they usually do per connection ?

See above.

It would be nice if I could aswell identify the codes that are making the calls aswell

The socket architecture does not allow for this deterministically - you can only get this from an assertion by the client program or by partitioning the code to use different authentication details.

I guess this last part is only available if it is a socket call right ?

Eh? That question makes no sense. There is no way to connect to a mysql other than using a socket.

share|improve this answer
    
Thanks for you helpfull answers :) about the last reply by socket i was pointing that if an user connects from another ip to the mysql i would not be able to get any information as to what code was used i was thinking it would be a local type of info. –  Guapo Oct 8 '10 at 21:34

You could try using mtop at http://mtop.sourceforge.net/

share|improve this answer
    
I am looking for commands within mysql but thanks. –  Guapo Oct 8 '10 at 21:34

Your Answer

 
discard

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.