I have a MySQL instance on my PC, but by default it's turned off. However, when I leave my PC running overnight, the next morning I find this friendly email from a person called Cron:
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Job run-parts --report /etc/cron.daily terminated (exit status: 1) (mailing output)
When you log slow queries or queries without indexes in MySQL, you should regularly rotate the file to save disk space. Quite some suggestions on the internet involve complex scripts which do this, other suggestions discuss FreeBSD's log rotator newsyslog. However, most of the descriptions about newsyslog appeared wrong to me, because no PID file was specified for the rule. This means that a SIGHUP is sent to the syslog daemon instead of the mysqld process, which is undesired.
When starting the Pure-FTPd daemon I came across the following error:
At some point, it was impossible for remote clients to connect to the MySQL server. The client (some application on a Windows platform) gave a vague description like Connection unexpectedly terminated. When remotely logging in with the MySQL client the following error appeared:
I copied the filesystem from one host to another, hoping that things would 'just work'. But that was a bit too optimistic, there was no way I could MySQL going again. This is what was reported in the error logs:
I tried to backup a database with the mysqldump command, but got the following error:
It seems the database name is not properly escaped and the . is misinterpreted.
QMail is quite a challenge to set up right, this will take you hours if you don't install it on a weekly basis. When you closed all holes from the outside to prevent acting like a open relay, there is the security on the localhost itself. It happened a few times already that a PHP script had an impromper loop condition which had a mail() call inside. This will guarantee you for having 10.000s of mails in your queue. Or think of a leak in a contact form abused by spammers.