Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Aaron Havens Mar 23 '10 at 3:55
add comment

1 Answer

up vote 0 down vote accepted

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'
share|improve this answer
    
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 '10 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'. –  Marnix A. van Ammers Apr 26 '10 at 2:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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