尝试在Vagrant中使用tmpfs for MySQL时出错

时间:2016-04-05 20:35:50

标签: mysql vagrant ramdisk tmpfs

我有一台Vagrant机器来运行Symfony,它与MySQL数据库进行了很多交互。为了尝试加快一点,我虽然为数据目录使用tmpfs文件系统。 数据目录位于/ var / lib / mysql,所以这是我试过的:

1)停止mysql服务:sudo service mysql stop

2)安装tmpfs:sudo mount -t tmpfs -o size=512M tmpfs /var/lib/mysql

3)启动mysql:sudo service mysql start

然后我收到以下错误:

Job for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xe" for details.

systemctl status mysql.service输出为:

● 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.

哪个不提供太多信息......关于如何调试这个或我做错了什么的想法?谢谢!

0 个答案:

没有答案