I installed MySQL community 5.1.45 on my Snow Leopard 10.6, using the pkg from their site. I had previously installed a MySQL binary from entropy.ch. In the previous installation, the connections were working fine before I upgrade to Snow Leopard. In Snow Leopard, both the installations are problematic.

Using an app called Sequel Pro, if I connect with the socket operation, it connects properly. However, a standard connection with the same credentials doesn't work. From what I've understood, socket connections happen on the machine itself between processes, whereas normal connections occur over the network/ports, in this case a loopback to my machine, since the server and client are both on the same machine.

My new CakePHP installation isn't being able to connect to the db with the root credentials I provided. Btw, I've been starting the MySQL server using the Preference Pane.

When I tried running mysqld from terminal, it gave me:

100323 1:54:37 [Warning] Can't create test file /usr/local/mysql-5.1.45-osx10.6-x86_64/data/mbp.lower-test 100323 1:54:37 [Warning] Can't create test file /usr/local/mysql-5.1.45-osx10.6-x86_64/data/mbp.lower-test mysqld: Can't change dir to '/usr/local/mysql-5.1.45-osx10.6-x86_64/data/' (Errcode: 13) 100323 1:54:37 [ERROR] Aborting

100323 1:54:37 [Note] mysqld: Shutdown complete

mbp is the name of my machine. How do I fix this so that my webserver can connect to the mysql server?

  • Are you running mysqld from the commandline using sudo? My first thought is that mysql doesn't have enough permissions to create the files it needs. Mar 23, 2010 at 3:55

1 Answer 1


The permissions in mysql for socket connections are separate from the network connections.

This will allow network connections:

grant all privileges on dbname.* to USERNAME@% identified by 'password'
  • Could you tell me the exact permission for network connections? Don't wanna keep a wide gaping hole in my system by enabling all permissions, including file execution abilities when my database has no need to. Especially since its an important machine with all my work on it.
    – Neil
    Mar 24, 2010 at 17:17
  • You might want to change the '%' in that grant statement to the name of the host that needs access. And maybe add a similar statement with the '%' set to 'localhost'. Apr 26, 2010 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.