LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Which server is running mysql? (https://www.linuxquestions.org/questions/linux-newbie-8/which-server-is-running-mysql-948387/)

Shahid nx 06-04-2012 01:15 AM

Which server is running mysql?
 
Hi All,
In our office we have so many servers . Among these some servers are running mysql. i m facing problem to find in which all the servers mysql is running. Sir/Friends is there any method to find this. Plz help me out. (I m working in linux platform)

Regards,
SHAHID NX

fukawi1 06-04-2012 02:40 AM

I would suggest using nmap.
Something along the lines of
Code:

nmap -p 3306 --open -sV 10.0.0.0/24 > mysqlservers
Where 10.0.0.0/24 would be replaced with the subnet you wish to scan.
This will scan all hosts on the specified subnet look for the mysql port to be open..
This is not going to be 100%, firewalls and such could break it easily...

Some other ideas to get you started.
Using ssh to remotely execute ps and/or netstat -tnlp to look for the mysql process or if mysql is listenning on port 3306.

If the traffic to/from the mysql servers is being routed, you could use tcpdump to sniff out the ip addresses sending packets on 3306.

I really have to say that I am astounded that you are in this situation, your network should be documented so you (and anybody else) always know what is where.


All times are GMT -5. The time now is 09:24 AM.