mysqladmin processlist Command
This command is used to find the connections to the mysql database. It gives information about Id, User, Host, db, Command, Time, State and Info of a mysql request to the server.
Example:
root@server [~]$ mysqladmin processlist
+--------+-----------------+-----------+-----------------------------+---------+-------+-------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+-----------------+-----------+-----------------------------+---------+-------+-------+
| 186678 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 28337 | | |
| 188706 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 27051 | | |
| 195090 | kronosho_usifu | localhost | kroho_sifu | Sleep | 23069 | | |
| 201227 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 19655 | |
Blocking IP [ apf, csf ]
APF and CSF are firewall software’s.
You can use these commands to block a particular IP from connecting to the server. This command is mainly used when you find too many connections from a particular IP. Normally too many connection might be a attack to the server. So it is important to block such IP before it interrupts the balance of the server.
Check which firewall is installed on your server and use it accordingly.
Example:
root@server [~]$ apf -d <IP>
or
root@server [~]$ csf -d <IP>
Checking the port if open or not [ telnet, nmap ]
This command is used to find the connections to the mysql database. It gives information about Id, User, Host, db, Command, Time, State and Info of a mysql request to the server.
Example:
root@server [~]$ mysqladmin processlist
+--------+-----------------+-----------+-----------------------------+---------+-------+-------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+-----------------+-----------+-----------------------------+---------+-------+-------+
| 186678 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 28337 | | |
| 188706 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 27051 | | |
| 195090 | kronosho_usifu | localhost | kroho_sifu | Sleep | 23069 | | |
| 201227 | mfjengin_shops | localhost | mfjengin_rapid | Sleep | 19655 | |
Blocking IP [ apf, csf ]
APF and CSF are firewall software’s.
You can use these commands to block a particular IP from connecting to the server. This command is mainly used when you find too many connections from a particular IP. Normally too many connection might be a attack to the server. So it is important to block such IP before it interrupts the balance of the server.
Check which firewall is installed on your server and use it accordingly.
Example:
root@server [~]$ apf -d <IP>
or
root@server [~]$ csf -d <IP>
Checking the port if open or not [ telnet, nmap ]