Mysqladmin Issue

Discussion in 'Installation/Configuration' started by Bob White, Jan 30, 2017.

  1. Bob White

    Bob White Member

    How do I tell mysqladmin to use a password when rotating logs and what that password is? I get a daily email that says it's unable to log into the database:
    /etc/cron.daily/logrotate:
    ^Gmysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    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 '
    run-parts: /etc/cron.daily/logrotate exited with return code 1

    Everything else seems to work properly.
    Thanks,
    Bob
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which OS?
     
  3. Bob White

    Bob White Member

    Ubuntu 16.04, using the Perfect Server setup for ISPConfig, Postfix, Dovecot, etc.

    Thanks!

    Bob
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to set the MySQL root password in /etc/mysql/debian.cnf file.
     
    MyKE likes this.
  5. Bob White

    Bob White Member

    Thanks, Till! I think that fixed it. I'd looked at that file at some point, but it contained a comment that it was automatically generated and not to modify it. Thanks for the help!

    Bob
     
  6. acreggae

    acreggae New Member

    I have the same problem. Bob, have you finally edited the /etc/mysql/debian.cnf file? Have you put the root password in plain text in this configuration file?

    Thanks
     

Share This Page