【问题标题】:SQLAlchemy 'character_set_name' error in GAEGAE 中的 SQLAlchemy 'character_set_name' 错误
【发布时间】:2015-01-12 03:19:56
【问题描述】:

在将应用程序部署到 Google App Engine 后,在(看起来像)随机请求时会引发此警告。

/sqlalchemy/dialects/mysql/base.py:2452: SAWarning: No 'character_set_name' can be detected with this MySQL-Python version; please upgrade to a recent version of MySQL-Python.  Assuming latin1.

sql server 是 Google Cloud SQL。

有没有办法修复它(可能将character_set_name 设置为某个值)或者它完全依赖于 App Engine 附带的 MySQL-Python 版本?

【问题讨论】:

    标签: python google-app-engine sqlalchemy mysql-python google-cloud-sql


    【解决方案1】:

    如果我使用,我会遇到这个问题:

    create_engine('mysql+gaerdbms:///xxx?instance=xxx:xxx')

    但是,如果你使用它就会消失:

    create_engine('mysql://root@127.0.0.1:3306/xxx?unix_socket=/cloudsql/xxx:xxx')

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-21
      • 1970-01-01
      • 2013-10-15
      • 2013-11-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多