3

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.

COil
  • 900

1 Answers1

3

It's not totally clear that you are running MySQL - the command that is referenced, mysql_upgrade is apparently a MariaDB command.

If, in fact, you are running MariaDB, then apt is instructing you to run mysql_update with the force option, as

mysql_upgrade --force

The documentation for mysql_upgrade indicates that the dB should be stopped and restarted after the command is run - this may be most easily done by rebooting your machine...

Please refer to man mysql_upgrade

Charles Green
  • 21,339
  • Hi, no, the mysql_upgrade works well, I can launch it: "Upgrade process completed successfully." it checks all the tables of the databases. I am not running mariadb : server version : 5.7.25-0ubuntu0.18.04.2 - (Ubuntu) – COil Feb 19 '19 at 14:07