Nick Bewley
Nick Bewley

Reputation: 9289

Mysql with Django Setup

I'm having problems setting up a django project on my mac os x 10.5. I've been following the recommendations on This Site and have had a little success. I have been able to successfully install mysql, mysql-python, and django separately. When I try to run Applications/mysql/bin/mysql -u root -p to setup the mysql server (as in point 8 in the linked article), I get the error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Any help on how to fix this so I can connect django / mysql and start developing locally? Thank you.

Upvotes: 0

Views: 736

Answers (1)

Tom Scrace
Tom Scrace

Reputation: 1626

Sometimes mysql.sock is in a different location. You can sym link it to /tmp/mysql.sock

Shut down mysql.

Execute: ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

Start mysql back up.

Hope that helps.

Upvotes: 1

Related Questions