Messages about failed logrotate task are received in Plesk on Ubuntu 18: 'Access denied for user 'root'@'localhost' (using password: NO)

Follow

Comments

7 comments

  • Avatar
    Sage Pointer

    Step 5 has typo (asterisk symbols were parsed as bold text):

    Should be:

    GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'PASSWORD';

    Instead of:

    GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON . TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'PASSWORD';

  • Avatar
    Duncan Mavuso

    Good Day

    The command on step 5 for MariaDB should be the following:

    GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'PASSWORD';

  • Avatar
    Ivan Postnikov

    Hello @Sage and @Duncan, thank you for notice.

    The article will be reviewed.

  • Avatar
    Markus Wernecke (Edited )

    Hi,
    I also use Ubuntu 18 with Plesk 17.8.11 and MariaDB 10.2.19. I receive the following message every day.
    Do you recommend me to do the same workaround? Or is it another problem with a different root cause?
    Lots of greets

    logrotate_script: line 2: [: /var/run/mysqld/mysqld.pid: binary operator expected

  • Avatar
    Alisa Kasyanova

    @Markus Wernecke
    Hi! Please check the "/etc/logrotate.d/mysql-server" file, if its content differs from the following, please change it accordingly:

    /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log {
    daily
    rotate 7
    missingok
    create 640 mysql adm
    compress
    sharedscripts
    postrotate
    test -x /usr/bin/mysqladmin || exit 0
    if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then
    # If this fails, check debian.conf!
    mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
    flush-engine-log flush-general-log flush-slow-log
    fi
    endscript
    }

    Thanks!

  • Avatar
    Markus Wernecke

    Hi @Alisa Kasyanova,

    thanks a lot for help. Yes there is a difference: ..."pid-file=\K[^$]+"` ];... I changed it to your configuration. Do I have to apply this by a command? So I wait until script will be executed in a few hours. Lots of greets

  • Avatar
    Alisa Kasyanova

    @Markus Wernecke
    You're welcome!
    You may test whether it is ok now by running "/etc/cron.daily/logrotate". If you won't receive the same notification, then it is fine.

Please sign in to leave a comment.

Have more questions? Submit a request