[Django]-Django on Google AppEngine with CloudSQL: How to connect database (Error 2002, Can't connect to local MySQL server..)

0👍

Looks like at the time, you were missing the password field as well…

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'test01',
        'USER': 'test01',
        'PASSWORD': '[password]',
        'HOST': '/cloudsql/myapp-test01:myapp-db-test01',
        'PORT': '3306',
    }

Using the GUI for Cloud SQL, you can always add new Super Admin level users to the Cloud SQL instance in case you’re unsure what user to use as well.

Leave a comment