Hi, I'm currently trying to configure my web app to run a mysql backend with python 3.4. I have installed mysqlclient, but I continue to get the following error:
> File "/home/rchurch4/.virtualenvs/django19/lib/python3.4/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
> File "/home/rchurch4/.virtualenvs/django19/lib/python3.4/site-packages/MySQLdb/connections.py", line 204, in __init__
super(Connection, self).__init__(*args, **kwargs2)
> django.db.utils.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
Basically, it is still trying to load MySQLdb, even though I've installed mysqlclient. Am I supposed to be editing anything else that every thread on this has forgotten to mention?
Here's my settings file (the part that matters):
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'rchurch4$xxx',
'USER': 'rchurch4',
'PASSWORD': 'xxx',
'HOST': 'rchurch4.mysql.pythonanywhere-services.com',
} }
I've looked through all the pythonanywhere tutorials as well as a few stackoverflow questions that were similar to this question, and not a single one has remedied this problem. Thanks in advance for the help.