Skip to content

cursor 使用mysql_mcp_server 链接mysql5.7版本异常终止 #31

Open
@GithubCao

Description

@GithubCao

用cursor 链接mysql_mcp_server 的mysql 5.7 版本 会在connect.connect(**config) 时候异常终止,没有返回信息;
需要增加以下配置保证正常运行
'auth_plugin': 'mysql_native_password',
'connect_timeout': 30, # 增加连接超时时间
'use_pure': True, # 使用纯Python实现
'raise_on_warnings': True
完整配置如下
config = {
"host": os.getenv("MYSQL_HOST", "localhost"),
"port": int(os.getenv("MYSQL_PORT", 3306)),
"user": os.getenv("MYSQL_USER","root"),
"password": os.getenv("MYSQL_PASSWORD"),
"database": os.getenv("MYSQL_DATABASE"),
'auth_plugin': 'mysql_native_password',
'connect_timeout': 30, # 增加连接超时时间
'use_pure': True, # 使用纯Python实现
'raise_on_warnings': True
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions