How to make mysql connection that requires CA-CERT with sqlalchemy or SQLObject

后端 未结 4 1428
刺人心
刺人心 2020-12-05 19:38

I would like to connect to a MySQL database that requires ca-cert. I can do it with MySQLdb like below:

MySQLdb.connect(host = self.host,
                po         


        
4条回答
  •  误落风尘
    2020-12-05 20:23

    create_engine() in SQLAlchemy has a connect_args parameter:

    connect_args – a dictionary of options which will be passed directly to the DBAPI’s connect() method as additional keyword arguments.

提交回复
热议问题