/etc/cron.daily/logrotate:
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
debianMySQL
/etc/cron.daily/logrotate:
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
Best Answer
The shared postrotate script tries to access the mysql database but fails to do so, probably because the password doesn't match.
In Debian, mysql is controlled via the mysql user 'debian-sys-maint'@'localhost'. The password for this user is stored in /etc/mysql/debian.cnf.
Note the password being used in this file. If you have a password for root (like you should), you will need to get into mysql with the following command.
Otherwise, you can just type 'mysql'. In the mysql> prompt, run the following.
Substitute the password found in /etc/mysql/debian.cnf in place of the Xs. And finally...
You should now be able to restart your mysql server with no errors using the command:
However, the restart is not required.