📜  创建 mysql 池连接 python flask - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:27.039000             🧑  作者: Mango

代码示例1
from mysql.connector import pooling

try:
    connection_pool = pooling.MySQLConnectionPool(pool_name="pynative_pool",
                                                  pool_size=1,
                                                  pool_reset_session=True,
                                                  host='localhost',
                                                  database='python_db',
                                                  user='pynative',
                                                  password='pynative@#29')