Dear MySQL users,
MySQL Connector/Python v1.2.1 is the new version of
the 1.2 release series of the pure Python database driver
for MySQL. It is intended to introduce users to the new features.
MySQL Connector/Python version 1.2.1 is compatible with MySQL Server
versions 5.5 and greater, but should work with earlier versions
(greater than 4.1). Python 2.6 and 2.7, as well as Python 3.1
and greater are supported.
MySQL Connector/Python 1.2.1 is available for download from
The ChangeLog file included in the distribution contains a brief summary
of changes in MySQL Connector/Python 1.2.1. For a more complete list of
changes, see below or online at:
Changes in MySQL Connector/Python 1.2.1 (2014-03-31)
Functionality Added or Changed
* 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_key and ssl_cert connection arguments are optional.
However, when either is given, both must be given or an
AttributeError is raised. (Bug #69418, Bug #17054848)
* Connector/Python now supports authentication plugins found in
MySQL 5.6. This includes mysql_clear_password and
sha256_password, both of which require an SSL connection. The
sha256_password plugin does not work over a non-SSL connection
because Connector/Python does not support RSA encryption.
The 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 auth_plugin='mysql_native_password'. (Bug
#68054, Bug #16217765)
* 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
(Bug #71124, Bug #17965619)
* A new MySQLConnection class reset_connection() method enables
applications to send a COM_RESET_CONNECTION to the server.
This method is analogous to the mysql_reset_connection() C API
function added in MySQL 5.7.3.
A new MySQLConnection class reset_session() method is similar
to reset_connection() but falls back to use reauthentication
for older servers that do not support COM_RESET_CONNECTION.
* 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
+ The 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
+ 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, ...])
* 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 connection. The fabric dictionary argument
to the connect() method accepts these additional values:
username, password, ssl_ca, ssl_cert, ssl_key. Only the ssl_ca
value is required to establish an SSL connection. If ssl_cert
or ssl_key are given, both must be specified.
* The connect() method now accepts a failover argument hat
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: user, password, host, port, unix_socket, database,
* The MySQLConnection.autocommit attribute failed to set the
value of the self._autocommit attribute. (Bug #18172769)
* Uninstalling Connector/Python using an RPM package failed to
remove the fabric folder. (Bug #18143073)
* For Fabric connections, any connect_attempts and connect_delay
values specified by the user were ignored. (Bug #18055719)
* The global MYSQL_FABRIC_PORT variable was changed from 8080 to
32274 to match the port change made in Fabric. (Bug #18075339)
References: See also Bug #70954.
* 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 DatabaseError (with
errorcode.ER_BAD_TABLE_ERROR) mentioning that the table is
unknown. (Bug #18047794)
* For Fabric operations, the default mode was supposed to be
read/write but was set to read-only. (Bug #18047591)
* 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 ValueError.
* Fabric has renamed the dump functionality to a new command
called dump. Consequently, Connector/Python now uses the new
functions dump.sharding_information, dump.fabric_nodes, and
dump.servers. (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 character set. (Bug #69067, Bug #18220593)
* The delay between attempts when trying to connect to a MySQL
Fabric-managed server was not honored. (Bug #71905, Bug
The source distribution includes the manual in various formats under
the docs/ folder.
We welcome and appreciate your feedback and bug reports:
On Behalf of the MySQL RE team at Oracle,
|• MySQL Connector/Python 1.2.1 RC has been released||karen langford||31 Mar 2014|