Google cloud sql: Lost connection to MySQL server while "reading source communication packet"

I created a django / django-wiki project by default. Local tests work fine. Connecting to cloud sql from the local server (c google.appengine.ext.django.backends.rdbms) does not work, in my opinion, due to some authentication problem. More importantly, I cannot connect from the production server.

I did not run local local MySQLdblocated in the virtual environment directory.

As app.yamlI have the following:

- name: MySQLdb
  version: "latest"

My entry is as DATABASEfollows:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'dbname',
        'USER': 'root',
        'PASSWORD': '',
        'HOST': '/cloudsql/appname:sqlinstance',
        'PORT': '',
    }
}

, , , mysql. ( , django):

File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/MySQLdb-1.2.4b4/MySQLdb/connections.py", line 190, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 38")

? , -, ? , , , AFAIK.

+4
2

, , . , sql, google, GAE . , Developer ConsoleStorageCloud SQLinstance-nameEditAUTHORIZED APP ENGINE APPLICATIONS. , SQL, .

, save .

+6

, , ( - ), , , , .

. ? ?

0

All Articles