Skip to content

Managing MySQL

Useful commands for managing MySQL. These commands should be executed as the root user on the same server the database role is running on.

See a full list of running SQL queries

Terminal window
docker exec mysqlcd mysql -e 'show full processlist'

Kill a running SQL query

Terminal window
docker exec mysqlcd mysql -e 'kill 1234'

Enter the MySQL container directly

Terminal window
docker exec -it mysqlcd /bin/bash