Digital Marketing

How to delete slow log file in MySQL

If you use

rm -f slow.log
to delete the slow query file in mysql, you need to run

flush slow logs;
or

shell> mysqladmin flush-logs

to release the file.

 You can use

$ sudo -i lsof -p `pid-of-mysqld` | grep -n "slow.log"
to verify it.

See also

How to deal with Big Slow Query Log in MySQL

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database

How to install elgg on Openshift