set_config()
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Connector/Python API
Topics on this page:
Overview
Sets the connection configuration for the connection pool. For valid connection arguments check the mariadb.connect() method.
See also: MariaDB Connector/Python 1.1 and in 1.0
EXAMPLES
import mariadb
pool = mariadb.ConnectionPool(pool_name = 'pool1')
pool.set_config(
pool_size = 3,
pool_reset_connection = False,
host = '127.0.0.1',
user = 'root',
password = 'secret',
database = 'test',
)
# Because the pool was created without connect options, we have to add
# the connections ourselves.
pool.add_connection()
pool.add_connection()
pool.add_connection()
conn = pool.get_connection()
CHANGE HISTORY
Release Series | History |
---|---|
1.1 |
|
1.0 |
|