我已经安装了mysql并且运行正常。
现在我想在我的Dropbox中拥有几个数据库的数据。所以我把符号链接放在我的mysql数据目录中。
sudo ln -s /Users/michaelbenker/Dropbox/geschaeft/softwareentwicklung/DB/testdatabase /usr/local/mysql/data/testdatabase
现在,当我尝试重启mysql时,出现错误
ERROR! MySQL server PID file could not be found!
Starting MySQL
. ERROR! The server quit without updating PID file
(/usr/local/mysql/data/Michaels-iMac-783.local.pid).
在我的错误文件中,我找到了这个条目
2017-05-26T11:29:12.067923Z 0 [ERROR] InnoDB: Operating system error
number 13 in a file operation.
2017-05-26T11:29:12.067928Z 0 [ERROR] InnoDB: The error means mysqld
does not have the access rights to the directory.
2017-05-26T11:29:12.067934Z 0 [ERROR] InnoDB:
os_file_readdir_next_file() returned -1 in directory ./, crash recovery
may have failed for some .ibd files!
2017-05-26T11:29:12.067963Z 0 [ERROR] InnoDB: Plugin initialization
aborted with error Generic error
2017-05-26T11:29:12.375057Z 0 [ERROR] Plugin 'InnoDB' init function
returned error.
2017-05-26T11:29:12.375090Z 0 [ERROR] Plugin 'InnoDB' registration as a
STORAGE ENGINE failed.
2017-05-26T11:29:12.375097Z 0 [ERROR] Failed to initialize plugins.
2017-05-26T11:29:12.375100Z 0 [ERROR] Aborting
所以我尝试了几件事来改变我的Dropbox data-dir的权限
没有任何帮助。
我在MacBook上做了同样的事情,这里一切正常。
这里是Dropbox目录的实际权限
drwxrwxrwx@ 5 _mysql _mysql 170 26 Mai 13:02 DB
答案 0 :(得分:1)
MySQL还需要能够更改为Dropbox目录的父,这意味着每个<{1}}。