Configures a MySQLConnection instance after it has been instantiated. See Chapter 7, Connector/Python Connection Arguments for a complete list of possible arguments.
You could use the config() method to change,
for example, the user name and call
reconnect().
cnx = MySQLConnection(user='joe', database='test') # Connected as 'joe' cnx.config(user='jane') cnx.reconnect() # Now connected as 'jane'

User Comments
Add your own comment.