本地环境缺少MYSQL_HOST_S配置 · Issue #135 · sinacloud/sae-python-dev-guide · GitHub
Skip to content

本地环境缺少MYSQL_HOST_S配置 #135

Description

@wbchn

线上Mysql中提供了主从库分别读写,本地环境使用中出错,从库读超时,走读代码发现,dev_server.py中只配置了主库,未设置从库地址,建议修改:

代码:https://github.com/sinacloud/sae-python-dev-guide/blob/master/dev_server/dev_server.py#L63

修改diff(我这边不单独提交pull requests了)

        sae.const.MYSQL_DB = dbname
        sae.const.MYSQL_USER = user
        sae.const.MYSQL_PASS = password
        sae.const.MYSQL_PORT = port
        sae.const.MYSQL_HOST = host
+      sae.const.MYSQL_HOST_S = host

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions