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