Reputation: 1182
I get the following error when I run the Django command "python manage.py syncdb"
_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2)
I have installed python, django and py26-mysql using macports. I ran in to issues installing mysql through macports so I installed a standalone version.
What do I need to change so that django uses my standalone version of mysql and not macports version of mysql. I have verified that only standalone server is running when I execute this command.
Thanks
Upvotes: 1
Views: 3029
Reputation: 32070
Use the HOST
setting in your settings file:
"HOST": '/path/to/your/socket.sock'
Upvotes: 5