MySQL Cron Job Error

    • OMV 4.x

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

    • David B wrote:

      Out of curiosity, have you found a solution to this?
      Nope, I have been sitting on a beach for the last week :)
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • David B wrote:

      I've looked in to this a little more, but I still haven't come up with anything. If anybody has any suggestions, please let me know.
      What is the output of this query: select user,plugin from mysql.user;
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • UPDATE mysql.user SET plugin = 'unix_socket' WHERE user = 'root';
      FLUSH PRIVILEGES;
      This should let you login as the root user without a password.
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      UPDATE mysql.user SET plugin = 'unix_socket' WHERE user = 'root';
      FLUSH PRIVILEGES;
      This should let you login as the root user without a password.
      Okay, I've done it! Now I'll just wait to see if I get another one of those e-mails tomorrow. I've accumulated quite a collection of them. Still one question though: isn't it dangerous to allow logins as the root user without requiring as password?
    • David B wrote:

      isn't it dangerous to allow logins as the root user without requiring as password?
      If someone can login to your system as root, a mysql password doesn't mean anything because they could start mysql in safe mode and change the password anyway.

      If you really want to change it, you can:
      GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' IDENTIFIED BY 'password';
      UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root';
      FLUSH PRIVILEGES;
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      If someone can login to your system as root, a mysql password doesn't mean anything because they could start mysql in safe mode and change the password anyway.
      If you really want to change it, you can:
      GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' IDENTIFIED BY 'password';
      UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root';
      FLUSH PRIVILEGES;
      Okay, that makes sense. Thanks for the tip!

      Unfortunately though, the issue is still unsolved. I got another one of those e-mails again in the middle of the night. The error message is the same as the one included in my initial post in this thread.
    • David B wrote:

      Unfortunately though, the issue is still unsolved. I got another one of those e-mails again in the middle of the night. The error message is the same as the one included in my initial post in this thread.
      The message says the debian-sys-admin can't login and that mysql user doesn't exist on my install. What is the output of:

      cat /etc/logrotate.d/mysql-server
      sudo grep -r debian-sys-admin /etc/*
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      cat /etc/logrotate.d/mysql-server

      Source Code

      1. # - I put everything in one block and added sharedscripts, so that mysql gets
      2. # flush-logs'd only once.
      3. # Else the binary logs would automatically increase by n times every day.
      4. # - The error log is obsolete, messages go to syslog now.
      5. /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log {
      6. daily
      7. rotate 7
      8. missingok
      9. create 640 mysql adm
      10. compress
      11. sharedscripts
      12. postrotate
      13. test -x /usr/bin/mysqladmin || exit 0
      14. if [ -f `my_print_defaults --mysqld | grep -m 1 -oP "pid-file=\K.+$"` ]; then
      15. # If this fails, check debian.conf!
      16. mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \
      17. flush-engine-log flush-general-log flush-slow-log
      18. fi
      19. endscript
      20. }
      Display All


      ryecoaaron wrote:

      sudo grep -r debian-sys-admin /etc/*
      No output for this one.
    • David B wrote:

      so he doesn't miss it
      Ok, I would try removing the debian-sys-admin:
      DELETE FROM mysql.user WHERE user = 'debian-sys-admin';
      FLUSH PRIVILEGES;

      Then try this again:
      sudo logrotate -f /etc/logrotate.d/mysql-server
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • David B wrote:

      Nope! Still happening.
      What is the output of: sudo cat /etc/mysql/debian.cnf
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      What is the output of: sudo cat /etc/mysql/debian.cnf
      I apologize for not getting back to you sooner. I've been on vacation.

      Source Code

      1. # Automatically generated for Debian scripts. DO NOT TOUCH!
      2. [client]
      3. host = localhost
      4. user = debian-sys-maint
      5. password = EHnxGN6TFjcqqJXA
      6. socket = /var/run/mysqld/mysqld.sock
      7. [mysql_upgrade]
      8. host = localhost
      9. user = debian-sys-maint
      10. password = EHnxGN6TFjcqqJXA
      11. socket = /var/run/mysqld/mysqld.sock
      12. basedir = /usr
      Display All
    • David B wrote:

      I apologize for not getting back to you sooner. I've been on vacation
      And we have finally found your problem. This is what the file should look like:

      Source Code

      1. # Automatically generated for Debian scripts. DO NOT TOUCH!
      2. [client]
      3. host = localhost
      4. user = root
      5. password =
      6. socket = /var/run/mysqld/mysqld.sock
      7. [mysql_upgrade]
      8. host = localhost
      9. user = root
      10. password =
      11. socket = /var/run/mysqld/mysqld.sock
      12. basedir = /usr
      Display All
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!