Forums

I need help with configuring my database in Django.

In April I had set up my webapp and I could have sworn it was working fine but today I tried and get this error:

OperationalError at (2005, "Unknown MySQL server host 'mysql.server' (0)")

I am not sure if I have configured it right but here are my settings :

DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': '<USERNAME>$<DATABASE>', 'USER':'*', 'PASSWORD':'*', 'HOST':'mysql.server', 'PORT':'3306', } }

When I checked the error.log I found this

OperationalError: (2005, "Unknown MySQL server host 'mysql.server' (0)") 2016-05-24 07:29:13,564 :Internal Server Error: /api/events/

Hi there,

We had deprecated the 'mysql.server' hostname for a year or so already! You should be using the new host name that you will find on your databases page.

You will need to change that in your code (basically settings.py)