我使用的主机是WIN10系统,搭建了一个以vagrant来控制的虚拟机作为开发环境。我的虚拟机是vbox,系统是centos7。所有需要依赖的vagrant插件全部都安装好了,包括vboxadditional vagrant-nfs vagrant-winnfs vagrant-bindfs。
主要问题如下:
我的/etc/my.cnf配置了datadir是我的vagrant NFS共享文件夹。叫/vagrant_db,权限什么的都用bindfs已经配置好了的。用户是mysql 用户组也是mysql。我的mysql.sock配置不变,仍然是/var/lib/mysql,因为我试过无数次配置到/vagrant_db都启动不了…..然后开机自动启动mysql居然可以成功…..但是数据库目录明显不是/vagrant_db。然后关闭mysql 重新开启mysql失败,报错:
2016-06-27T08:56:12.882562Z 0 [ERROR] InnoDB: Log file ./ib_logfile0 size 4096 is not a multiple of innodb_page_size
2016-06-27T08:56:12.882602Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-06-27T08:56:13.484483Z 0 [ERROR] Plugin ‘InnoDB’ init function returned error.
2016-06-27T08:56:13.484510Z 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
2016-06-27T08:56:13.484516Z 0 [ERROR] Failed to initi