mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid prevent from server restart
In my case the problem was that mysql tried to create temporary files in /var/run/mysqld
and that directory did not exist. I solved the problem by creating the directory manually and setting permissions for it:
mkdir -p /var/run/mysqld
chown mysql:mysql /var/run/mysqld