I started debugging a performance problem and noticed the
following when trying to enable the MySQL slow log:
mysql> set @@global.slow_query_log=ON;ERROR 13 (HY000): Can't
get stat of './mysql/slow_log.CSV' (Errcode: 2)
What is going on?First off within MySQL5.1 MySQL has the ability
to put slow logs into a CSV table to query against. It appears
even though the slow query logging is set to file, MySQL server
confirms that the slow_log table within the mysql schema is there
and working.
As a background, this database was hotbackup restored from
another server. As Pythian mention, CVS tables are not synced over
by default.
To recover, lets put an empty CVS file structure on the
filesystem and turn the slow query on:
box01:/databases/data/mysql# touch …
[Read more]