I want to connect to a mysql server via flask and
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://your-username:your-password@localhost/schema'
How can I add ca-cert, client-key and client-cert to the connection?
I want to connect to a mysql server via flask and
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://your-username:your-password@localhost/schema'
How can I add ca-cert, client-key and client-cert to the connection?
You can add theses informations in your URI like this :
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://your-username:your-password@localhost/schema?ssl_key=MyCertFolder/client-key.pem&ssl_cert=MyCertFolder/client-cert.pem'
Or using the SQLAlchemy create_engine, take a look to this post