Functionality Added or Changed
Connector/Python now permits the type for stored procedure parameters to be specified. To do this, specify a parameter as a two-item tuple consisting of the parameter value and type. For more information, see Method MySQLCursor.callproc(). (Bug #71124, Bug #17965619)
It was not possible to initiate an SSL session without
explicitly giving a key and certificate. Now it is possible to
connect to a MySQL server using only the
ssl_ca connection argument pointing to a file
of CA certificates. This means the
ssl_cert connection arguments are
optional. However, when either is given, both must be given or
AttributeError is raised.
(Bug #69418, Bug #17054848)
Connector/Python now supports authentication plugins found in
MySQL 5.6. This includes
sha256_password, both of which require an
SSL connection. The
does not work over a non-SSL connection because Connector/Python
does not support RSA encryption.
connect() method now supports an
auth_plugin parameter that can be used to
force use of a particular plugin. For example, if the server is
configured to use
sha256_password by default
and you want to connect to an account that authenticates using
mysql_native_password, either connect using
SSL or specify
(Bug #68054, Bug #16217765)
Connector/Python now can report errors to Fabric that occur while accessing a MySQL instance. The information can be used to update the backing store and trigger a failover operation, provided that the instance is a primary server and Fabric has received a sufficient number of problem reports from different connectors.
fabric dictionary argument to the
connect() method now accepts a
report_errors value. Its default value is
False; pass a value of
True to enable error reporting to Fabric.
To define which errors to report, use the
from mysql.connector.fabric import extra_failure_report extra_failure_report([error_code_0, error_code_1, ...])
For more information, see Requesting a Fabric Connection.
connect() method now accepts a
failover argument that provides information
to use for server failover in the event of connection failures.
The argument value is a tuple or list of dictionaries (tuple is
preferred because it is nonmutable). Each dictionary contains
connection arguments for a given server in the failover
sequence. Permitted dictionary values are:
Connector/Python now enables applications to specify additional
information to be used when connecting to Fabric: User name and
credentials, and information to use for establishing an SSL
fabric dictionary argument to
connect() method accepts these additional
ssl_ca value is required to establish an
SSL connection. If
ssl_key are given, both must be specified.
For more information, see
Requesting a Fabric Connection.
reset_connection() method enables
applications to send a
to the server. This method is analogous to the
mysql_reset_connection() C API
function added in MySQL 5.7.3.
reset_session() method is similar to
reset_connection() but falls back to use
reauthentication for older servers that do not support
COM_RESET_CONNECTION. For more information,
failed to set the value of the
Uninstalling Connector/Python using an RPM package failed to
MYSQL_FABRIC_PORT variable was
changed from 8080 to 32274 to match the port change made in
References: See also Bug #70954.
For Fabric connections, any
connect_delay values specified by the
user were ignored.
For Fabric sharding operations, Connector/Python raised an
incorrect error when a table was given with the
tables connection property for which no
sharding information was available. This now results in a
errorcode.ER_BAD_TABLE_ERROR) mentioning that
the table is unknown.
For Fabric operations, an incorrect exception was raised by
set_property() when a connection property
value had the wrong type (for example, when the
tables property was not a tuple or a list).
set_property() now correctly raises a
For Fabric operations, the default mode was supposed to be read/write but was set to read-only. (Bug #18047591)
The delay between attempts when trying to connect to a MySQL Fabric-managed server was not honored. (Bug #71905, Bug #18335432)
Fabric has renamed the dump functionality to a new command
dump. Consequently, Connector/Python
now uses the new functions
(Bug #71124, Bug #17965619)
MySQLCursor.executemany() caused a
UnicodeDecodeError when non-ASCII characters
existed in the
seq_params parameter and the
operation was a Unicode instance with Python 2. This is now
corrected by encoding the operation per the current connection
(Bug #69067, Bug #18220593)