Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 61 10 Older Entries

Displaying posts with tag: myconnpy (reset)

Connector/Python 2.1 with C Extension using Connector/C
Employee +0 Vote Up -0Vote Down

In time for Oracle OpenWorld 2014, we released Connector/Python 2.0. We also released a labs release Connector/Python 2.1 and we have a new feature: a C Extension which uses Connector/C.

This C Extension is an optional, an alternative to the pure Python MySQL Client protocol implementation. One of the reasons to implement it was to improve performance in some situations, for example, when huge result sets are returned. Pure Python is still default, if C Extension is not available.

The following post will get your through downloading and installing the MySQL Connector/Python 2.1.0 labs release.

Requirements

  • Windows users out of
  [Read more...]
MySQL Connector/Python 2.0.1 an 1.2.3 on PyPI
Employee +0 Vote Up -0Vote Down

Both MySQL (http://www.mysql.com" target="_blank) Connector/Python 2.0.1 and 1.2.3 are now available through the Python Package Index or PyPI. Leaving the previous version available is probably a good idea as you can always go back if needed.

Note that we still have no files hosted at PyPI.

Relocated Connector/Python on GitHub
Employee +0 Vote Up -0Vote Down

We have relocated the MySQL Connector/Python repository on GitHub to the following location:

https://github.com/mysql/mysql-connector-python

The old location will redirect to the above URL.

No, we have not updated the README.txt or made something special for GitHub. I personally don’t mind what is currently showing on GitHub: it is readable, and it is correct. I still hope GitHub will make it easier to show something else, like asking which document to display and as what format.

MySQL Connector/Python 2.0.1 GA
Employee +0 Vote Up -0Vote Down

MySQL Connector/Python v2.0 goes GA with version 2.0.1 GA. It is available for download from the MySQL Developer Zone! The previous post about 2.0 described what changed and what was added, here’s an overview:

  • Incompatibilities
    • Supported Python: 2.6 and 2.7 and 3.3 and 3.4
    • Raw Cursors Return bytearray Objects
    • LOAD LOCAL DATA INFILE On by Default
  • New features
    • New Cursors return dictionaries and named tuples
    • Options Files Support Added
  • Packaging and support files removed
  • We are on
  [Read more...]
MySQL Connector/Python on GitHub
Employee +1 Vote Up -0Vote Down

Last week we released Connector/Python v2.0 (alpha); today we publish the source on GitHub. Yes, we are using Git internally and are now able to push it out on each release. Previous versions are still available through LaunchPad.

Here is the full process to get Connector/Python installed in a virtual environment. You’ll need Git installed of course.

shell> git clone https://github.com/oracle/mysql-connector-python.git cpy
shell> virtualenv ENVCPY
shell> source ENVCPY/bin/activate
(ENVCPY)shell> cd cpy
(ENVCPY)shell> python setup.py install
(ENVCPY)shell> python
>>> import
  [Read more...]
MySQL Connector/Python v2.0.0 alpha
Employee +2 Vote Up -0Vote Down

A new major version of Connector/Python is available: v2.0.0 alpha has been been released and is available for download! As with any alpha-software, it’s probably not good to throw it in production just yet.

Our manual has the full change log but here’s an overview of most important changes for this relase.

Some incompatibilities

The world evolves, at least the software does, and Python is not different. I’m not as bold as the guys at Django who dropped support of Python v2.6 with the Django v1.7 release. I’m leaving it in because I’m nice.

  [Read more...]
MySQL Connector/Python v1.2.2 GA supporting MySQL Fabric
Employee +2 Vote Up -0Vote Down

A few weeks ago MySQL Fabric got GA and shipped together with MySQL Utilities 1.4. Today, 2 weeks late, a tooth less and having fixed my website(s), I can blog about MySQL Connector/Python v1.2 going GA.

My previous post about the release candidate already summed up the important changes, and nothing changed since then except few bug fixes. Here are again the important new features/bugs fixed for Connector/Python v1.2:

  • Added support for MySQL Fabric.
  • Support for MySQL’s Authentication Plugins: mysql_clear_password and sha256_password are now supported over an SSL connection.
  • Failing over connections (note: not
  [Read more...]
MySQL Connector/Python v1.2.1 RC
Employee +0 Vote Up -0Vote Down

Monday 31 March 2014 proved to be a big day for MySQL with 5 announcements of products getting new releases: the next milestone release MySQL Server 5.7.4, MySQL Workbench 6.1 going GA and Connector/J 5.1.30 and MySQL Utilities 1.4.2 RC which include MySQL Fabric. That’s 4, the fifth being Connector/Python.

Connector/Python v1.2.1 has been released as

  [Read more...]
Snippet: Fetching results after calling stored procedures using MySQL Connector/Python
Employee +3 Vote Up -0Vote Down

Problem

Using MySQL Connector/Python, you are calling a stored procedure which is also selecting data and you would like to fetch the rows of the result.

Solution

For this example we create a stored procedure which is executing SHOW SLAVE STATUS.

cnx = mysql.connector.connect(user='scott', password='tiger',
                              database='mining')
cur = cnx.cursor()
cur.execute("DROP PROCEDURE IF EXISTS slave_status")
proc = "CREATE PROCEDURE slave_status () BEGIN SHOW SLAVE STATUS; END"
cur.execute()
cur.call("slave_status")

for result_cursor in cur.stored_results():
 for row in result_cursor:
   print(row[0])

The result from the above would be:

shell> python foo.py
Waiting for master to send event

Discussion

The

  [Read more...]
MySQL Connector/Python v1.1.6 GA
Employee +0 Vote Up -0Vote Down

This week we released MySQL (http://www.mysql.com" target="_blank) Connector/Python v1.1.6 has been released with a fix for the Django backend. If you  wonder (or not?) where Connector/Python v1.1.5, it got released a few weeks ago. Yes, PyPi has been updated! Don’t forget to use –allow-external using newest pip.

Some useful links:

  [Read more...]
Showing entries 1 to 10 of 61 10 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.