Home >Database >Mysql Tutorial >How to enable slow query log in docker mysql container
docker to view the running container
docker ps
docker exec -it dc8880c13fef /bin/bashEnter the username and password Log in to mysql
mysql -u root -p
show variables like ‘slow%’; (or use, see other bloggers say there will be version differences, then use double percent signs: show variables like ‘%slow %’;)
set global slow_query_log = ON;
The above is the detailed content of How to enable slow query log in docker mysql container. For more information, please follow other related articles on the PHP Chinese website!