I have been setting up some new server recently and ran accross this error happening in the daily cron jobs:
/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
Using phpmyadmin on the server shows that the debian-sys-maint user is correct and has all permissions, so I can only assume the password has some how got mangled in all the upgrading process.
You should find you have a file:
/etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = XXXXXXXXXXXXXXXX socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian-sys-maint password = XXXXXXXXXXXXXXXX socket = /var/run/mysqld/mysqld.sock basedir = /usr
If you have deleted or have lost the debian-sys-maint user then you need to recreate it with:
GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD 'xxxxxxxxxxxxxxxx'
Else simply update the password
UPDATE user SET Password=PASSWORD("xxxxxxxxxxxxxxx") WHERE User='debian-sys-maint';
And with any luck that should be you back on the road to logrotate!