I've got a problem with Ubuntu that I can't resolve. I was upgrading my Ubuntu from 18.04 to 20.04 and during the installation process and error occured:
apparmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
After that the installation freezed. I canceled it, restarted my computer and finished installation of the new version of ubuntu. Everything seemed working except mysql. I've tried to reinstall it multiple times and nothing worked. The installation of mysql ends up with success, but it's freezes up when trying to start the service. This is the last message I get:
mysqld is running as pid 20051
This is service status:
mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mysql.service.d
└─override.conf
Active: activating (start) since Sat 2023-03-04 11:25:37 CET; 38s ago
Process: 20230 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 20257 (mysqld)
Status: "Server shutdown complete"
Error: 2 (Nie ma takiego pliku ani katalogu) // there is no such file or directory
Tasks: 38 (limit: 18989)
Memory: 364.3M
CGroup: /system.slice/mysql.service
└─20257 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid --skip-grant-tables --skip-networking
mar 04 11:25:37 kuba systemd[1]: Starting MySQL Community Server...
mar 04 11:25:40 kuba systemd[1]: mysql.service: Got notification message from PID 20257, but reception only permitted for main PID 20255
I've tried to reinstall mysql multiple times, I purged it, removed /etc/mysql and /var/lib/mysql etc and everytime I end up in the same situation. I need to manually kill the proccess of starting the mysql service to unfreeze the console (ctrl+C dont work). Trying to start the service (with service mysql start
) shows nothing and can be terminated with ctrl+c, but apt-get install -f
or dpkg --configure -a
are freezing after:
mysqld is running as pid 20051
line. I've tried everything I found and nothing helped. The last chance is to reinstall Ubuntu, but I would prefer not to do that.