Mysql not running in background

The mysql service is not being pushed to the background after startup.
I start the service with sudo systemctl start mysql.service it starts up. I can connect send queries. But the the command stays on my console and doesn’t go into the background. I have it running on two servers both are running ubuntu 20 and the same version of percona xtradb cluster 8.0.26. I had to force it to the background with

control + z
bg

On my other server I do not have the issue. Both have same version of xtradb cluster and same OS. Service files are the same. Is there some other file I can check?

1 Like

Hi @danarashad
In general servece should be started in the background as systemd unitfile has Type=notify
If you set up a service using Type=notify, systemd will automatically set up a communication socket back to systemd and will export its path to the service under $NOTIFY_SOCKET.

It will also listen for special messages in that socket, such as whether the service is ready (in which case systemd will transition it to status started, since initialization is completed) and also the self-reported status of the service, which will also be reported in the output of systemctl status mytest.service (assuming a service called mytest.)

1 Like

Apparmor was the issue. Permissions were not set correctly.

1 Like