0

I created a /etc/tmpfiles.d/mysqld.conf, /etc/tmpfiles.d/mysql.conf, /usr/lib/tmpfiles.d/mysql.conf, /usr/lib/tmpfiles.d/mysqld.conf

with the content

d /var/run/mysqld 0755 mysql mysql -

yet after rebooting /var/run/mysqld doesn't get created. I'm on ubuntu 16.04 and mysql-server version is 5.7.

Any idea why it doesn't create the directory?

user630702
  • 465
  • 6
  • 25
  • Do you have apparmor enabled on your system ? Check the logs, you may found something corresponding to your file – Dom Sep 27 '19 at 10:56

1 Answers1

0

Seems like it wasn't the problem with /var/run/mysqld dir. Instead I had to run mysqld --initialize and its safe since its a new installation. Once the initialize finished, /lib/systemd/system/mysql.service - RuntimeDirectory created a mysqld dir under /var/run/

user630702
  • 465
  • 6
  • 25