MySQL server start issues on Mavericks

后端 未结 4 948
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 10:51

I am having difficulty using MySQL on my MacBook, I am trying to start my server using sudo mysqld_safe and this results in the following output:

14         


        
4条回答
  •  没有蜡笔的小新
    2021-01-30 11:38

    File permissions are definitely the cause of the issue. There are far better experts than me, but I recommend the following:

    Ensure your entire data directory is owned by the _mysql user with permissions drwxr-xr-x.

    In your case, it appears that your MySQL installation directory is your data directory. My data directory is in a subdirectory of the installation directory.

    You can probably get up and running by changing permissions per the command:

    sudo chown -R _mysql:admin /usr/local/var/mysql
    sudo chmod -R u+rwX,g+rwX,o-rwx /usr/local/var/mysql
    

    This may limit your dave account from accessing the mysql installation directory without sudo, so you may wish to tweak these permissions to include g+rwx if your dave user is a member of the admin group, which it appears to be. That tweak would be accomplished with:

    sudo chmod -R g+rwx /usr/local/var/mysql
    

提交回复
热议问题