Forums

django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on 'bp43 zaph3l07degzwu5b-mysql.services.clever-cloud.com' ([Errno 111] Connection refuse d)")

[formatted by admin]

DATABASES = {
      'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '********',
        'USER': '*************',
        'PASSWORD': '***********',
        'HOST': 'bp43zaph3l07degzwu5b-mysql.services.clever-cloud.com',
        'PORT': '3306',
    }
    }

Not able to connect with this hosted mysql service. What to do?

Hi, since you're on a free account you will not be able to connect to an external database.

Hey, thanks for the reply.

I have the .SQL file for the database. Can I build the db on the local MySQL service by python anywhere.

Yes, sure -- just create a MySQL server on the "Databases" page inside PythonAnywhere, and then you can use the mysql command to load up your data into it.