Comment 8 for bug 2051987

Revision history for this message
Victor Vavan (victorvavan) wrote (last edit ):

Hi all,

I'm dealing with a case that is suffering from this bug.

$ sudo lsof +L1
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME
mysqld 328 mysql 1w REG 8,3 99624508241 0 23331627 /var/log/mysql/error.log.1 (deleted)
mysqld 328 mysql 2w REG 8,3 99624508241 0 23331627 /var/log/mysql/error.log.1 (deleted)
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/mysql/error.log.1 (deleted)
landscape 575 root 6w REG 8,3 353 0 21794792 /var/log/landscape/watchdog.log.1 (deleted)
landscape 842 landscape 6w REG 8,3 2166444 0 21784887 /var/log/landscape/broker.log.1 (deleted)
landscape 843 landscape 6w REG 8,3 2737262 0 21794803 /var/log/landscape/monitor.log.1 (deleted)
landscape 844 root 6w REG 8,3 600319 0 21794805 /var/log/landscape/manager.log.1 (deleted)

# /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.

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
Openstack Yoga
Juju 2.9.43
mysql-innodb-cluster 8.0/stable

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 'LMfSBaA9l2z4EdjD1';

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.