this is somewhat related to this question, as since this problem I never came back to a totally clear and stable state for apt.
So when trying to do something with apt, I always get this error message:
Paramétrage de mysql-server-5.7 (5.7.25-0ubuntu0.18.04.2) ...
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.25, use --force if you still need to run mysql_upgrade
Then the terminal hangs and I have to kill the terminal process, event a CTRL+C doesn't work.
What is weird is that before the error message, MySQL is working well, I can access the database and run the applications. After the error message when trying to access PhpMyAdmin I get the following error:
mysqli_real_connect(): (HY000/2002): No such file or directory
Here are the logs of "journalctl -xe":
févr. 14 11:05:32 lvernetZ240 audit[6196]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=6196 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
févr. 14 11:05:32 lvernetZ240 kernel: audit: type=1400 audit(1550138732.282:76): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=6196 comm="mysqld" requested_mask="r" denied_mask="r" fsui
févr. 14 11:05:32 lvernetZ240 audit[6198]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=6198 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=122 ouid=0
févr. 14 11:05:32 lvernetZ240 kernel: audit: type=1400 audit(1550138732.306:77): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=6198 comm="mysqld" requested_mask="r" denied_mask="r" fsui
févr. 14 11:05:33 lvernetZ240 usbmuxd[4814]: [11:05:33.563][1] config_get_device_record: failed to read '/var/lib/lockdown/dc1629d763979ed25f83a67ac74bf83f3e1b1675.plist': No such file or directory
févr. 14 11:05:38 lvernetZ240 usbmuxd[4814]: [11:05:38.560][1] config_get_device_record: failed to read '/var/lib/lockdown/dc1629d763979ed25f83a67ac74bf83f3e1b1675.plist': No such file or directory
And the only solution is to reboot. Then MySQL works again. But the state stays unstable and APT will always try to reconfigure it. I am considering reinstalling the workstation which I'd like to avoid. Thanks for your help.
--force
option. – COil Feb 15 '19 at 15:51