1

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?

1
  • 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. Commented Mar 23, 2010 at 3:55

1 Answer 1

0

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'
2
  • 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
    Commented 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'. Commented Apr 26, 2010 at 2:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .