# /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
Workaround: restart MySQL application manually.
The username/password combination in /etc/mysql/debian.cnf for user debian-sys-maint do NOT work.
Hi all,
I'm dealing with a case that is suffering from this bug.
$ sudo lsof +L1 mysql/error. log.1 (deleted) mysql/error. log.1 (deleted) mysql/error. log.1 (deleted) landscape/ watchdog. log.1 (deleted) landscape/ broker. log.1 (deleted) landscape/ monitor. log.1 (deleted) landscape/ manager. log.1 (deleted)
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
mysqld 328 mysql 1w REG 8,3 99624508241 0 23331627 /var/log/
mysqld 328 mysql 2w REG 8,3 99624508241 0 23331627 /var/log/
mysqld 328 mysql 6u REG 8,3 0 0 21794716 /tmp/#21794716 (deleted)
mysqld 328 mysql 7u REG 8,3 142 0 21794718 /tmp/#21794718 (deleted)
mysqld 328 mysql 8u REG 8,3 0 0 21794720 /tmp/#21794720 (deleted)
mysqld 328 mysql 13u REG 8,3 2175 0 21794755 /tmp/#21794755 (deleted)
filebeat 572 root 18r REG 8,3 99624508701 0 23331627 /var/log/
landscape 575 root 6w REG 8,3 353 0 21794792 /var/log/
landscape 842 landscape 6w REG 8,3 2166444 0 21784887 /var/log/
landscape 843 landscape 6w REG 8,3 2737262 0 21794803 /var/log/
landscape 844 root 6w REG 8,3 600319 0 21794805 /var/log/
# /usr/bin/mysqladmin --defaults- file=/etc/ mysql/debian. cnf ping sys-maint' @'localhost' (using password: YES)'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-
Workaround: restart MySQL application manually.
The username/password combination in /etc/mysql/ debian. cnf for user debian-sys-maint do NOT work.
We logged into MySQL:
juju exec --unit mysql/leader leader-get mysql.passwd
juju ssh mysql/leader
sudo mysql -u root -p"<password>"
The user is present in the DB:
+------ -----+- ------- ------- ---+ -----+- ------- ------- ---+ -----+- ------- ------- ---+
| Host | User |
+------
| localhost | debian-sys-maint |
+------
Ubuntu Focal cluster 8.0/stable
Openstack Yoga
Juju 2.9.43
mysql-innodb-
I changed the password for user debian-sys-maint to reflect what is in /etc/mysql/ debian. cnf
ALTER user 'debian- sys-maint' @'localhost' IDENTIFIED by 'LMfSBaA9l2z4Ed jD1';
I could then log in as the user and the section that was failing in /etc/logrotate. d/mysql- server succeeds:
sudo /usr/bin/mysqladmin --defaults- file=/etc/ mysql/debian. cnf ping
mysqld is alive
The changes persist through reboot of the MySQL units.
I'm not sure what triggered the password change in debian.cnf (or MySQL?) however.