auto_reconnect

This connection value (read/write) enables or disables automatic reconnection to the server when the connection is lost.

See also: MariaDB Connector/Python 1.0

EXAMPLES

Enable auto-reconnection behavior for a connection and output its state:

import mariadb

conn = mariadb.connect(
    host = 'localhost',
    user = 'root',
    password = 'secret',
    )

conn.auto_reconnect = True
print(conn.auto_reconnect)