Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garbinmarcelo/6f763735a46a35e8d934385c8a4aae35 to your computer and use it in GitHub Desktop.
Save garbinmarcelo/6f763735a46a35e8d934385c8a4aae35 to your computer and use it in GitHub Desktop.
docker-install-mariadb-with-slow-query
# Docker image mariadb 10.2.24 (https://hub.docker.com/_/mariadb)
~$ docker run --name mariadb -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d docker.io/library/mariadb:10.2.24 --slow-query-log=TRUE --log-output=TABLE
# SQL check variables
SHOW VARIABLES LIKE 'slow_query%';
SHOW VARIABLES LIKE 'log_output%';
SHOW VARIABLES LIKE 'long_%';
SELECT benchmark(100000000, md5('running query'));
SELECT * FROM mysql.slow_log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment