mysql logging

general_log_file = /var/log/mysql/mysql.log general_log = 1

SHOW VARIABLES LIKE "general_log%";

SET GLOBAL general_log_file = '~/log_files/mysql_log.log';

SET GLOBAL slow_query_log = 'ON';

SET GLOBAL slow_query_log_file = '/path/filename';

/etc/my.cnf

slow_query_log = 1 log-queries-not-using-indexes long_query_time=1 log-slow-queries=/var/log/mysql/log-slow-queries.log