Hello,
I have two databases on my server, a production
db and a dev
db.
The production
db backs up every night and also updates the dev
db with the latest batch of data.
I am trying to configure my local development environment to connect to the dev
db. I have followed your advice on this page and installed MySQL Workbench. The server connects succesfully to PythonAnywhere via SSH.
However I am having issues configuring the connection within Django. In my dev.py
settings file I have the following:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'myusername$dev',
'USER': 'myusername',
'PASSWORD': 'mypassword',
'HOST': '127.0.0.1',
'PORT': '3306',
}
}
This unfortunately does not work and throws the following error: django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (10061)")
. Google hasn't been able to help me on this one.
Any ideas? Thanks