User Tools

Site Tools


linux:bash_sql_connections
#!/bin/bash
 
srvstatus=$(systemctl is-active mysqld)
if [[ "$srvstatus" != "active" ]]; then printf "\nMariaDB is not running on this server...\n\n"; exit ; fi ; printf "\n"
 
mysql -e "SELECT DB,USER,HOST,STATE FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY DB DESC;" ; printf "\n"
linux/bash_sql_connections.txt · Last modified: 12/01/2024 15:27 by Allan