Geert JM Vanderkelen

MySQL Connector/Python v1.0.5 beta available for download

MySQL Connector/Python v1.0.5 beta available for download

MySQL Connector/Python v1.0.5 beta is now available for download from the MySQL website. This version is feature complete and we welcome and appreciate feedback and bug reports.

We’re also interested in hearing your feedback for future enhancements. Let us know how you’re using the connector too, especially if you are using it with Django, SQLAlchemy and similar Python technologies.

A few things have changed since the last development releases and we hope the manual shipping with the Connector/Python distribution (and also available online soon) will help you get up to speed.

Here are a few important changes that might be incompatible with current scripts using the now obsolete development releases v0.3.2 and earlier:

  • MySQLCursor.execute() returns None. When multiple statements are send, it will return a generator object.
  • raises and exception. The is_connected() method will return True or False.
  • The following methods of MySQLConnection changed: set_charset() replaced by set_charset_collation(); unset_client_flag() and set_client_flag() are removed, use set_client_flags() instead.

There have been quite a few changes and bug fixes. I recommend checking the ChangeLog file in the distribution of MySQL Connector/Python, and, once available, also the change log in the MySQL manual.

You can download Connector/Python 1.0.5-beta at:

If you’d like to ask questions or seek advice in using the connector, check out the following MySQL forum:

10 thoughts on “MySQL Connector/Python v1.0.5 beta available for download

    1. Geert Vanderkelen Post author

      Connector/Python 1.0 will work with SQLAlchemy once the dialect is updated.

      But Connector/Python is pure Python and does not need any other MySQL software, thus no C libraries and compiling.

  1. David McNelis

    One more thing. SQLAlchemy was looking for get_characterset_info(). I was able to get everything working without any blatant issues with the following (which is hacky.. but I needed it to work right now). Fwiw, I’m running SQLAlchemy 0.7, MySQL 5.1 and needed to support SSL connections to the db… they seem to be working just fine.

    def get_characterset_info(self, **kwargs):
    def set_client_flag(self, flags):
            return self.set_client_flags(flags)

    (Updated by Geert: Showing Python code better)

    1. Geert Vanderkelen Post author

      Thanks so much for trying out the beta of Connector/Python with SQLAlchemy!

      The best way would be to update the dialect of SQLAlchemy:

      def _get_server_version_info(self, connection):
        from mysql.connector.constants import ClientFlag

      Although I’m not sure why the client flags have to be set there.

      def _detect_charset(self, connection):
        return connection.connection.charset

      There seems to be not much to change in the dialect, which is a good thing :)
      (Above code is not tested, but should be good start)

Leave a Reply

Your email address will not be published. Required fields are marked *

29 + = 34

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>