MySQLConnection instance after
it has been instantiated. For a complete list of possible
arguments, see Chapter 7, Connector/Python Connection Arguments.
kwargs: Connection arguments.
You could use the
config() method to change
(for example) the user name, then call
cnx = mysql.connector.connect(user='joe', database='test') # Connected as 'joe' cnx.config(user='jane') cnx.reconnect() # Now connected as 'jane'
For a connection obtained from a connection pool,
config() raises an exception. See
Section 8.1, “Connector/Python Connection Pooling”.
Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices