Articles in this section

MariaDB logrotate on Plesk server reports error: logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator

kb: technical Plesk Obsidian for Linux Plesk Onyx for Linux ABT: Group B

Applicable to:

  • Plesk Obsidian for Linux
  • Plesk Onyx for Linux

Symptoms

  • Error messages with the following content are sent to the administrator daily:

    CONFIG_TEXT: /etc/cron.daily/logrotate:
    logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator

  • Running MariaDB logrotate manually shows the same error:

    # /usr/sbin/logrotate /etc/logrotate.d/mysql-server -f
    logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator

Cause

Bug MDEV-11884 in MariaDB Debian/Ubuntu packaging, which is planned to be fixed in version 10.5.

Resolution

If MariaDB was installed from the OS repositories (default)

  1. Connect to the server via SSH.

  2. Install the latest updates:

    # apt update && apt upgrade

If MariaDB was installed from unofficial repositories (manually)

Warning: the following solution should be applied at your own risk. It is recommended to use the OS repositories for database servers.

  1. Connect to the server via SSH.

  2. Modify the /etc/logrotate.d/mysql-server file as per the solution suggested in the MariaDB bugtracker.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.