Showing entries 11 to 20 of 69
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: myconnpy (reset)
Relocated Connector/Python on GitHub

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

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
[Read more]
MySQL Connector/Python on GitHub

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 mysql.connector
>>> mysql.connector.__version__ …
[Read more]
MySQL Connector/Python v2.0.0 alpha

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.

Supported Python: 2.6 and 2.7 and 3.3 and 3.4

We do not …

[Read more]
MySQL Connector/Python v1.2.2 GA supporting MySQL Fabric

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 MySQL Fabric HA)

Of course, …

[Read more]
MySQL Connector/Python v1.2.1 RC

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 Release Candidate. Check out the  …

[Read more]
Snippet: Fetching results after calling stored procedures using MySQL Connector/Python

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 stored_results() method of …

[Read more]
MySQL Connector/Python v1.1.6 GA

This week we released MySQL 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]
Installing MySQL Connector/Python using pip v1.5

The latest pip versions will fail on you when the packages it needs to install are not hosted on PyPI. When you try to install MySQL Connector/Python the usually way, you get following message is:

shell> pip install mysql-connector-python
  Could not find any downloads that satisfy the requirement 
    mysql-connector-python
  Some externally hosted files were ignored 
    (use --allow-external mysql-connector-python to allow).

I have updated the download URL to include the MD5 checksum, and MySQL Connector/Python should now install using pip using following command:

shell> pip install --allow-external mysql-connector-python \
  mysql-connector-python

Yes, you have to repeat the mysql-connector-python name. …

[Read more]
MySQL Connector/Python v1.1.4 GA

It has been a busy week for the Pythonic MySQL Team at Oracle: MySQL Utilities 1.3.6 and a brand new Utilities 1.4.1 Alpha has been release which includes Fabric. Yes, and of course, the one binding them all: Connector/Python v1.1.4 has been released as GA (General Available). Check out the Change History if you want to keep up with what is being added and changed.

New features found in v1.1:

  • Important: Connector/Python will not work with Python v2.4 or v2.5. Yes, I consider this a feature.
  • Connector/Python comes with it’s own …
[Read more]
Showing entries 11 to 20 of 69
« 10 Newer Entries | 10 Older Entries »