mysql error handling
Add logrotate.