I use the telnet command to check if MySQL port is responding.
telnet 10.10.10.24 3306
I use the ctrl character to disconnect. This is working as expected. How do I use this command in shell script?
|
I use the telnet command to check if MySQL port is responding.
I use the ctrl character to disconnect. This is working as expected. How do I use this command in shell script? |
|||
|
|
If you're just looking to check if the port is open, try:
|
|||
|
|
|||||
|
|
If you don't have nc, you can use bash special files redirectons:
|
|||
|
|
|
I would use netcat and it's '-w' instead; host:~ user$ nc -w 1 1.2.6.1 3306 ? 5.1.57-1~dotdeb.1?WO`rA*L#h?b4z.pmT;i~^;host:~ user$ |
|||
|
|