This question was formerly: "Mysql replication logs are filling disk and halting server". However, I'm asking the community if there is a command line trace or live log that I could
tail -f and see queries being executed on a server.
We run a Drupal 7 instance on a load balanced set up with a mysql replication between the primary and failover box. I've come in on Mondays to find the failover machine completely full mysql-relay-bin.0000xxxx files.
We suspect that something may be perhaps a bit overzealous with database writes and this is getting replicated over. Or, we frankly may have set up replication poorly.
Is there a utility by which I can
tail the various queries that mysql is running on a particular database?
$ cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # sync log-bin=mysql-bin server-id=1 expire_logs_days = 1 max_binlog_size = 100M . . . # sync config log-bin = /var/log/mysql/mysql-bin.log binlog_do_db=drupal server-id=1
Replicant (Slave) my.cnf
$ cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 server-id=2 master-host=xxx.xx.xx.xxx master-user=slave_user master-password=XXXXXXXXXXXXXXX master-connect-retry=60 replicate-do-db=drupal slave-skip-errors = 1062,1054 expire_logs_days = 2 max_binlog_size = 100M ssl
Drupal specific question asked at: https://drupal.stackexchange.com/questions/145451/