daily mail with cron failed

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • daily mail with cron failed

      everyday i have a mail with foloing message:

      Source Code

      1. /etc/cron.daily/logrotate:
      2. mysqladmin: connect to server at 'localhost' failed
      3. error: 'Access denied for user 'root'@'localhost' (using password: NO)'
      4. error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
      5. run-parts: /etc/cron.daily/logrotate exited with return code 1
      what does it meen?
      What can i do?
      Thanks!
      omv 4.0.19 | 64 bit | omvextrasorg 4.1.2 | kernel 4.14
      used plugins: nginx | mysql | docker-gui |rsnapshot | antivirus | apt tool | letsEncrypt |
      used other: netxtcloud | logitechmediaserver | emby
    • Hello,

      I have mostly the same error message each day in my inbox mail folder.

      Source Code

      1. /etc/cron.daily/logrotate:
      2. mysqladmin: connect to server at 'localhost' failed
      3. error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
      4. error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
      5. run-parts: /etc/cron.daily/logrotate exited with return code 1


      How to solve this ?
      Debian GNU/Linux 9.3 (Stretch) - OpenMediaVault 4.1.4-1 Arrakis - Kernel 4.15.0-0.bpo.2-amd64 - CPU Intel Pentium G3460
    • Missing debian maintenance user is the culprit (I guess). To fix it you need to edit
      /etc/mysql/debian.cnf

      It should look like

      [client]
      host = localhost
      user = debian-sys-maint
      password = SECRET_PASSWORD
      socket = /var/run/mysqld/mysqld.sock
      [mysql_upgrade]
      host = localhost
      user = debian-sys-maint
      password = SECRET_PASSWORD
      socket = /var/run/mysqld/mysqld.sock

      I had as user debian and no password also I had an additonal line
      basedir = /usr
      but that line seems to be OK. The user debian I've changed two times to debian-sys-maint and I added a password (again two times)


      then (if your mysql root user is still omvadmin, otherwise change to your root user below)

      mysql -u omvadmin -p


      now enter your mysql rootusers password and execute these three commands (each line is a single command)


      Source Code

      1. CREATE USER IF NOT EXISTS 'debian-sys-maint'@'localhost' IDENTIFIED BY 'SECRET_PASSWORD';
      2. GRANT ALL ON *.* TO 'debian-sys-maint'@'localhost' WITH GRANT OPTION;
      3. FLUSH PRIVILEGES;
      Replace SECRET_PASSWORD with the one you set above in /etc/mysql/debian.cnf

      You'll create a new mysql user and create the necessary privileges for it.

      That's it
    • Users Online 1

      1 Guest