Cant start mysql

When i try to run

sudo service mysql start

it just kinda "loads" no output or nothing.

nothing is shown in the error logs.

sudo service mysql status mariadb.service - MariaDB 10.3.32 database server Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled) Active: activating (start) since Wed 2022-04-13 11:43:40 CEST; 2min 39s ago Docs: man:mysqld(8) Process: 2247 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS) Process: 2258 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS) Process: 2259 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, stat> Main PID: 2307 (mysqld) Tasks: 33 (limit: 1103) Memory: 352.3M CGroup: / └─2307 /usr/sbin/mysqld
Apr 13 11:43:40 servername systemd[1]: Starting MariaDB 10.3.32 database server...
Apr 13 11:43:40 servername mysqld[2307]: 2022-04-13 11:43:40 0 [Note] /usr/sbin/mysqld (mysqld 10.3.32-MariaDB-0ubuntu0.20.04.1) starting as process 2307 ...

Doing it without sudo gives the same result

EDIT

So it seemes that stuff didnt work properly after all but it got solved by doing the following

There was a corrupted profile i /etc/apparmor.d (usr.sbin.mysqld)

echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld

After that a restart of the service was made and everything seems to be back to normal

9

1 Answer

so it seemes that stuff didnt work properly after all but it got solved by doing the following

There was a corrupted profile in /etc/apparmor.d (usr.sbin.mysqld)

echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld

After that a restart of the service was made and everything seems to be back to normal

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like