I have a Vagrant machine to run Symfony and it does a lot of interaction with a MySQL database. To try to speed it up a little bit I though about using a tmpfs file system for the data dir. The data dir is located at /var/lib/mysql, so here's what I tried:
1) stop the mysql service: sudo service mysql stop
2) mount the tmpfs: sudo mount -t tmpfs -o size=512M tmpfs /var/lib/mysql
3) start mysql: sudo service mysql start
And then I get the following error:
Job for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql.service
output is:
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit) since Tue 2016-04-05 20:30:52 UTC; 1min 58s ago
Process: 3376 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 3375 ExecStart=/usr/bin/mysqld_safe (code=exited, status=0/SUCCESS)
Process: 3839 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
Main PID: 3375 (code=exited, status=0/SUCCESS)
Apr 05 20:30:52 libe systemd[1]: mysql.service holdoff time over, scheduling restart.
Apr 05 20:30:52 libe systemd[1]: start request repeated too quickly for mysql.service
Apr 05 20:30:52 libe systemd[1]: Failed to start MySQL Community Server.
Apr 05 20:30:52 libe systemd[1]: Unit mysql.service entered failed state.
Apr 05 20:30:52 libe systemd[1]: mysql.service failed.
Which doesn't give too much information... Any ideas on how to debug this or what I'm doing wrong? Thanks!