Reputation: 92
I´ve installed mysql and it worked fine.
Now I´d liked to have the data of several databases in my dropbox. So I put symlinks in my mysql data dir.
sudo ln -s /Users/michaelbenker/Dropbox/geschaeft/softwareentwicklung/DB/testdatabase /usr/local/mysql/data/testdatabase
Now when I tried to restart mysql, I get the error
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).
In my error file I found this entry
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
So I tried several things to change the permission to my Dropbox data-dir
Nothing helped.
I did the same on my MacBook and here everything worked fine.
Here the actual permissions on the Dropbox Dir
drwxrwxrwx@ 5 _mysql _mysql 170 26 Mai 13:02 DB
Upvotes: 0
Views: 135
Reputation: 385144
MySQL will also need to be able to change into the parents of the Dropbox directory, which implies a +x
on each one.
Upvotes: 1