Comment 3 for bug 1438788

Revision history for this message
Oleg Strikov (strikov-deactivatedaccount) wrote :

Hi Argenis,

Today I tried to upgrade from 5.6.23-1~exp1~ubuntu4 to 5.6.23-1~exp1~ubuntu5 and reproduce the issue you observed.
Here is what I found:

Upgrade from ~ubuntu4 to ~ubuntu5 runs smoothly.
Mysql service starts after upgrade and automatically starts after reboot.
I can't reproduce the fact that service doesn't start automatically.
I assume that you observed the issue with autostart while using previous version of the package (~ubuntu4) i.e. one you used before the upgrade.
Could you please confirm that?
If so -- you met this bug: https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1435823
It was fixed in the latest version of the package.

I was able to reproduce the issue with upgrading the package (second part of the bug):
Removing mysql-server-5.6 (5.6.23-1~exp1~ubuntu5) ...
/usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/mysql.service to /dev/null: File exists

Please note that this issue is not related to the latest package (~ubuntu5) itself.
It happens because the previous version (~ubuntu4) created incorrect symlink at /etc/systemd/system/ which can't be removed while removing the package.
Latest version of the package won't create this symlink but you need to manually remove the link created by the previous version of the package. Once you do it -- you won't observe this issue in future.

To fix this issue run the following command when apt-get remove/purge crashes:
$ sudo rm /etc/systemd/system/mysql.service
Now, re-run remove/purge. It should finish correctly this time.
After carrying out this procedure you can reinstall mysql back. You won't observe the issue again.
You may use this bug as a reference: https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1436178

Please try to apply this workaround and let us know if it helps you or not.
Thanks for reporting the bug!