我想通过flask连接到mysql服务器
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://your-username:your-password@localhost/schema'
如何将 ca-cert、client-key 和 client-cert 添加到连接中?
请您参考如下方法:
您可以像这样在 URI 中添加这些信息:
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://your-username:your-password@localhost/schema?ssl_key=MyCertFolder/client-key.pem&ssl_cert=MyCertFolder/client-cert.pem'
或者使用SQLAlchemy create_engine,查看 this post