coder
coder

Reputation: 1941

Not able to get mysql running on my mac

I'm trying to install mysql on my mac but unable to start server. When I try to start mysql server, I get this error in the logs: Can't start server: can't create PID file: Permission denied. Can't create/write to file ~/Downloads/mysql-5.5.32-osx10.6-x86_64/data/HOSTNAME.pid. I have symlinked /usr/local/mysql to ~/Downloads/mysql-5.5.32-osx10.6-x86_64. And all files/directories under /usr/local/mysql and ~/Downloads/mysql-5.5.32-osx10.6-x86_64 are owned by mysql. I'm trying start mysql server as root. Searched everywhere for this, but no luck. I tried with mysql 5.5 and 5.6. Same problem with both the versions. Any clues?

Upvotes: 0

Views: 184

Answers (3)

abcd_win
abcd_win

Reputation: 107

Use below permission to grant permissions: check your mysqld location, mine is this:

do this: ls -ld /usr/local/var/mysql

sudo chmod a+w /usr/local/var/mysql

Upvotes: 0

Kevin Sylvestre
Kevin Sylvestre

Reputation: 38012

I'd highly recommend you install mysql using Homebrew. To do this:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install mysql

The output of the second command may give you a few extra steps. Follow them and you should be set.

Upvotes: 3

isaach1000
isaach1000

Reputation: 1839

You have to start it as an administrator. Write sudo and a space followed by the command you will use to start MySQL.

Upvotes: 0

Related Questions