Additions:
==Global Settings==
May be globally defined in /etc/mysql/my.cnf
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
log = /var/log/mysql.log
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days = 20
max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
May be globally defined in /etc/mysql/my.cnf
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
log = /var/log/mysql.log
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log-bin = /var/log/mysql/mysql-bin.log
expire-logs-days = 20
max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
Additions:
Error logs and Query logs are overwritten when you restart mysqld or flush the logs. So make sure you save them FIRST !
Deletions:
So make sure you save them FIRST !
Additions:
%%--log-error[=file_name]%%
Deletions:
Additions:
==WARNING==
Error logs and Query logs are overwritten when you restart mysqld or flush the logs.
So make sure you save them FIRST !
Save logs
$ cd mysql-logfile-directory
$ cp mysql.log mysql.old
$ cp mysql-slow.log mysql-slow.old
then restart mysql or flush logs
Error logs and Query logs are overwritten when you restart mysqld or flush the logs.
So make sure you save them FIRST !
Save logs
$ cd mysql-logfile-directory
$ cp mysql.log mysql.old
$ cp mysql-slow.log mysql-slow.old
then restart mysql or flush logs
Deletions:
Additions:
%%--log-slow-queries[=file_name]%%
SQL statement
Command line
SQL statement
Command line