python - Google cloud sql: Lost connection to MySQL server at 'reading initial communication packet' -


i've set default django/django-wiki project. local tests work fine. connecting cloud sql local server (with google.appengine.ext.django.backends.rdbms) doesn't work, believe due authentication issue. more importantly, can't connect production server.

i've made sure not deploy local mysqldb sitting in virtual environment directory.

i have following in app.yaml:

- name: mysqldb   version: "latest" 

my database entry following:

databases = {     'default': {         'engine': 'django.db.backends.mysql',         'name': 'dbname',         'user': 'root',         'password': '',         'host': '/cloudsql/appname:sqlinstance',         'port': '',     } } 

it seems working, or @ least doesn't complain missing packages or mysql import issues. problem following (obtained production logs, visible via django debug output):

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 mysql server @ 'reading initial communication packet', system error: 38") 

what causing this? mean connection made there no reply? other posts seem mention issue when connecting external source, connection app engine afaik.

well, more straight forward expected. had assumed cloud sql, created google account grant access gae app default. has set explicitly, developer console->storage->cloud sql->instance-name->edit->authorized app engine applications. or when create sql instance, open advanced options.

i added name of app in box, hit save , worked.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -