python - SQLalchemy mysql url connection string on cloud sql -


what's conncetion url mysql in sqlalchemy while connecting google app engine ??

i know it's

mysql+gaerdbms:///<dbname>?instance=<my cloud instance name> 

but specify user, password , host. below error while connecting above string.

947, in makerequest raise _todbapiexception(response.sql_exception) operationalerror: (operationalerror) (1045, u"access denied user 'root'@'localhost' (using password: no)") none none 

the mysql+gaerdbms:// deprecated. please use mysql+mysqldb:// instead. format of connection uri is:

mysql+mysqldb://root@/<dbname>?unix_socket=/cloudsql/<projectid>:<instancename>

note above works in app engine prod. recommended way connect dev_appserver request ip , use connect.

reference: http://docs.sqlalchemy.org/en/latest/dialects/mysql.html?highlight=appengine#module-sqlalchemy.dialects.mysql.gaerdbms


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -