Logrotate error for mysql

  • Hello,


    since few days (and probably after an update, I have error logs from logrotate :

    Code
    /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
    /var/log/mysql/error.log '
    run-parts: /etc/cron.daily/logrotate exited with return code 1


    any idea how to fix that ?

  • since I didn't install mysql myself, I am not sure ...
    I think it came with plex.


    my /etc/mysql/debian.cnf looks like this

    and I have a mysql system user (but no 'debian-sys-maint') :


    Code
    mysql:x:114:120:MySQL Server,,,:/nonexistent:/bin/false


    solution for the blog didn't work (same with mysql root+password or admin+password):

    Code
    root@omv:~# mysqladmin --defaults-file=/etc/mysql/debian.cnf ping
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
    
    
    root@omv:~# echo "GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '$(grep -m 1 password /etc/mysql/debian.cnf | cut -d" " -f3)'; flush privileges;" | mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


    so ... what can I do ?

  • I had the same problem and solved it with:

    Substitue *PASSWORD* with your output.
    So I had to know the root password for the mysql option '-p' in line 4.
    For 'Bye' from mysql press <Ctrl-D>.
    Hope this helps ;)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!