According to the documentation one two we should close connector each time we connect it.
import mysql.connector
cnx = mysql.connector.connect(**config)
# do some stuff
cnx.close()
Does it support with
interface to do something like this?:
with mysql.connector.connect(**config):
#do some stuff