Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 259 Next 30 Older Entries

Displaying posts with tag: Python (reset)

ConFoo is looking for speakers
+1 Vote Up -0Vote Down

ConFoo is currently looking for web professionals with deep understanding of PHP, Java, Ruby, Python, DotNet, HTML5, Databases, Cloud Computing, Security and Mobile development to share their skills and experience at the next ConFoo. Submit your proposals between August 25th and September 22nd.

ConFoo is a conference for developers that has built a reputation as a prime destination for exploring new technologies, diving deeper into familiar topics, and experiencing the best of community and culture.

  • ConFoo 2015 will be hosted on February 18-20 in Montreal, at the Hilton Bonaventure Hotel.
  • We take good care of our speakers by covering most expenses including travel, accommodation, lunch, full conference ticket, etc.
  • Presentations are 35min + 10min for questions, and may be delivered in
  [Read more...]
Which tech do startups use most?
+0 Vote Up -0Vote Down
Leo Polovets of Susa Ventures publishes an excellent blog called Coding VC. There you can find some excellent posts, such as pitches by analogy, and an algorithm for seed round valuations and analyzing product hunt data. He recently wrote a blog post about a topic near and dear to my heart, Which Technologies do Startups […]
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...]
On Dolphins, Panda's and Bugs
+2 Vote Up -0Vote Down
MySQL Bugs On Dolphins, Panda's and Bugs

Like any good OpenSource project the MySQL Bugs website is open for anyone to search through. This ofcourse doesn't include the security bugs.

There is a second collection of bugs in the My Oracle Support and these bugs are only accesseble by customers with a support contract. Even when I have access to MOS I still prefer to use the community bugs site. For service requests etc. I would use MOS.

The openness of the bugs database is one of the topic the IOUG MySQL Council discusses with Oracle.

The bugs database has more to offer than just information about initial bugs:

  [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 Fabric: Musings on Release 1.4.3
Employee +2 Vote Up -0Vote Down
As you might have noticed in the press release, we just released MySQL Utilities 1.4.3, containing MySQL Fabric, as a General Availability (GA) release. This concludes the first chapter of the MySQL Fabric story.

It all started with the idea that it should be as easy to manage and setup a distributed deployments with MySQL servers as it is to manage the MySQL servers themselves. We also noted that some of the features that were most interesting were sharding and high-availability. Since we also recognized that every user had different needs and needed to customize the solution, we set of to create a framework that would support sharding and high-availability, but also other solutions.

With the release of 1.4.3, we have a range of features that are now available to the community, and all under

  [Read more...]
MySQL Fabric: Server Properties & Scaling out reads
Employee +0 Vote Up -0Vote Down
MySQL Replication is a well-known approach to providing high-availability and scaling out read-only operations (i.e. transactions) as well. In order to make it easy to exploit this scalability axis, we have extended both Fabric and the connectors' interface so that an application can express its willingness to execute a read-only operation and have its request redirected to the server that is most capable of handling it.

In this post, we are going to describe how we can use Fabric and the connector python to scale out read-only operations. We need to introduce some concepts first though.

Fabric organizes the servers in high-availability groups, uses the standard MySQL Replication to synchronize the servers which can be classified according to its status, mode and weight. The blog post



  [Read more...]
Benchmark: SimpleHTTPServer vs pyclustercheck (twisted implementation)
+0 Vote Up -0Vote Down

Github user Adrianlzt provided a python-twisted alternative version of pyclustercheck per discussion on issue 7.

Due to sporadic performance issues noted with the original implementation in SimpleHTTPserver, the benchmarks which I’ve included as part of the project on github use mutli-mechanize library,

  • cache time 1 sec
  • 2 x 100 thread pools
  • 60s ramp up time
  • 600s total duration
  • testing simulated node fail (always returns 503, rechecks mysql node on cache expiry)
  • AMD FX(tm)-8350 Eight-Core Processor
  • Intel 330 SSD
  • local loop back test (127.0.0.1)

The SimpleHTTPServer instance faired as follows:

  [Read more...]
Writing a Fault-tolerant Database Application using MySQL Fabric - MySQL Fabric 1.4.2 Release Candidate
Employee +2 Vote Up -0Vote Down
If we want to run the application presented in "Writing a Fault-tolerant Database Application using MySQL Fabric" with MySQL Fabric 1.4.2 Release Candidate, some changes to the application are required. In the previous post, we used MySQL Fabric 1.4.0 Alpha and many changes have been made since this version. We can find an updated version of the application here:
Recall that the application creates a simple database, a high availability group, registers the MySQL Servers into Fabric and runs a thread that mimics a client and another one that
  [Read more...]
New! MySQL Utilities release-1.4.2-RC
Employee +2 Vote Up -0Vote Down
The MySQL Utilities Team is pleased to announce the latest release candidate (RC) release of MySQL Utilities. This release includes a number of improvements for useabilty, stability, and a few enhancements. A complete list of all improvements can be found in our release_notes.

New Utilities!


We have also included two new utilities.
  • The mysqlrplsync utility was added, which checks data consistency between servers in a replicated setup. 
  • The mysqlrplms utility was added, which provides round-robin multi-source replication (a slave server continually cycles through multiple masters in order to store a consolidated data set).

How Can I Download MySQL Utilities?


You can download MySQL Utilities 1.4.2 from





  [Read more...]
Configuring and running MySQL Fabric 1.4.2
Employee +1 Vote Up -0Vote Down
To install and run MySQL Fabric, we need:
  • Python 2.6 or 2.7
  • Connector Python (MySQL Fabric-aware Version 1.2.1 or later)
  • One or more MySQL servers installed and running (5.6.10 or later):
    • Backing Store
    • Managed Servers
  • MySQL Utilities 1.4.2 or later

Python 2.6 or 2.7

We can use the following command to check whether python is installed in our machine or not:

$ python --version

If you don't have the appropriate version installed, please, read through the following web page and find out how to download and install python 2.6 or 2.7:


MySQL 5.6












  [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...]
Sandboxed MySQL Utilities – HowTo
+0 Vote Up -0Vote Down

Often I would need to work on customer servers where MySQL Utilities would be a really good fit for the tools I need. However, I would not want to mess around with the customer servers just to have it running so I would have the tools built and sandboxed on its own directory where I can cleanup later. Here’s how:

cd ~
wget http://mysql.mirrors.hoobly.com/Downloads/MySQLGUITools/mysql-utilities-1.4.1.tar.gz
tar xzf mysql-utilities-1.4.1.tar.gz
cd mysql-utilities-1.4.1
python setup.py build
python setup.py install --root=/home/revin/mysql-utilities-1.4.1
export PYTHONPATH=.:/home/revin/mysql-utilities-1.4.1/usr/lib/python2.6/site-packages
/home/revin/mysql-utilities-1.4.1/usr/bin/mysqlfrm --help

Your source of the package and install directory may vary – enjoy!

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...]
MySQL Connectors, a Real Plus for Developers
Employee_Team +2 Vote Up -0Vote Down

MySQL Connectors provide connectivity to the MySQL server for client programs. APIs provide low-level access to the MySQL protocol and MySQL resources. Both Connectors and the APIs enable you to connect and execute MySQL statements from another language or environment. Oracle provides a number of these, enabling developers to build database applications in the language of their choice. Among those developed by Oracle are drivers for JDBC and ODBC. Any system that works with JDBC or ODBC can use MySQL. And you can find many more, including drivers for PHP, Perl, Python, Ruby, Tcl and even Eiffel!

To get a head start on developing with MySQL, take the MySQL for

  [Read more...]
Caveats with Eventlet
+0 Vote Up -0Vote Down
The Stackforge Libra project as with most Openstack based projects is written in Python.  As anyone who has used Python before probably knows, Python has something called a GIL (Global Interpreter Lock).  The GIL basically causes Python to only execute one thread at a time, context switching between the threads.  This means you can't really use threads for performance reasons in Python.

One solution to get a little more performance is to use Eventlet.  Eventlet is a library which uses what is called "Green Threads" and hacks on top of the networking libraries to give a mutli-threaded like feel to an application.  As part of this blogging series for HP's Advanced Technology Group I'll write about some of the things I found out

  [Read more...]
ConFoo 2014 is at our door steps
+0 Vote Up -0Vote Down

ConFoo, the conference for web developers, is hosting its fifth edition. It will take place in Montreal at the Hilton Bonaventure on February 26th – 28th. These five days are packed with great technical talks and semi-private trainings on your favorite technologies.

It’s definitely a conference for IT professionals, wether you are a developer, integrator or project manager. With its 150 talks, you are sure to find a presentation that will help you grow your core skills. Among them you can find :

  • Mobile development
  • Cloud computing
  • Project management
  • Databases and big data
  • Development with PHP, Ruby, Java, DotNet, Python and Javascript
  • Web security

Meet the experts who crafted your

  [Read more...]
The FOSDEM schedule in SQL
+1 Vote Up -0Vote Down
I thought it would be nice to be able to query the FOSDEM schedule for the MySQL devroom with SQL.

So I wrote a small Python script which downloads the schedule and inserts it into a MySQL database.

Some examples:
mysql> SELECT summary,dtstart,location,description FROM calendar 
-> WHERE calname='MySQL devroom'
-> AND MATCH (summary, description) AGAINST ('Fabric')\G
*************************** 1. row ***************************
summary: Sharding and Scale-out using MySQL Fabric
dtstart: 2014-02-01 16:05:00
location: UA2.114 (Baudoux)
description: MySQL Fabric is an open-source solution released by the MySQL Engineering team 
at Oracle. It makes management of MySQL server farms easy and available for both












  [Read more...]
Installing MySQL Connector/Python using pip v1.5
Employee +0 Vote Up -0Vote Down

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.

MySQL Connector/Python v1.1.4 GA
Employee +0 Vote Up -0Vote Down

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
  [Read more...]
New! MySQL Utilities release-1.3.6 GA
Employee +1 Vote Up -0Vote Down
The MySQL Utilities Team is pleased to announce the latest GA release of MySQL Utilities. This release includes a number of improvements for usability, stability, and a few enhancements. We have also included a performance upgrade for exporting, importing, and copying databases.

Improvements


The following highlights a few of the more significant improvements.

* mysqldbexport, mysqldbimport, and mysqldbcopy have multiprocessing support that allows for much improved performance
* mysqlfrm can now generate a .frm file with storage engine substitution
* Mac OS X packages added!
* mysqlserverinfo now includes the log files (error, general, slow)
* mysqlprocgrep can now search and kill processes by id
* mysqlmetagrep can now search the body of routines with the new --body option
* all utilities report license










  [Read more...]
MySQL Utilities: copy, replicate, show, failover… over and over again.
Employee +3 Vote Up -0Vote Down

So, after installing Workbench 6.0.7 on my pc, and playing around with the MySQL Utilities that are included, I thought I’d do similar to what others have done (Thanks Tony D.) and share my experience on how I’ve used them. If you haven’t installed Workbench before, you might want to check your platform first: http://www.mysql.com/support/supportedplatforms/workbench.html (http://www.mysql.com/support/supportedplatforms/workbench.html).

So, even if you’re not using any of the recent versions and editions of Workbench (Utilities comes with all of them, Tools menu -> “Start Shell for MySQL Utilities“) you can

  [Read more...]
MySQL Utilities: copy, replicate, show, failover… over and over again.
Employee +0 Vote Up -0Vote Down

So, after installing Workbench 6.0.7 on my pc, and playing around with the MySQL Utilities that are included, I thought I’d do similar to what others have done (Thanks Tony D.) and share my experience on how I’ve used them. If you haven’t installed Workbench before, you might want to check your platform first: http://www.mysql.com/support/supportedplatforms/workbench.html (http://www.mysql.com/support/supportedplatforms/workbench.html).

So, even if you’re not using any of the recent versions and editions of Workbench (Utilities comes with all of them, Tools menu -> “Start Shell for MySQL Utilities“) you can

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

Connector/Python v1.1.3 is available for testing since last week. It is a “beta” release, so it would be great if we even get more feedback. Check out the Change History if you want to keep up with what is being added and changed.

Notable changes for v1.1.3 include a fix for encoding using \x5c or backslashes in multi-byte characters. We also made the code more PEP-8 compliant, which we think is quiet important.

Some useful links:

  [Read more...]
Snippet: Show column information using MySQL Connector/Python
Employee +1 Vote Up -0Vote Down

Problem

You have a query executed by MySQL Connector/Python and would like to show column information nicely on the console.

Solution

Every cursor object has a description property. This can be used to show information about the columns in a result set.

columns = []
maxnamesize = 0
for coldesc in cur.description:
    coldesc = list(coldesc)
    coldesc[2:6] = []
    columns.append(coldesc)
    namesize = len(coldesc[0])
    if namesize > maxnamesize:
        maxnamesize = namesize

fmt = "{{nr:3}} {{name:{0}}} {{type:12}} {{null}}".format(
    maxnamesize+1)
colnr = 1
for column in columns:
    (colname, fieldtype, nullok,
  [Read more...]
Data Analytics at NBCUniversal. Interview with Matthew Eric Bassett.
+0 Vote Up -0Vote Down
“The most valuable thing I’ve learned in this role is that judicious use of a little bit of knowledge can go a long way. I’ve seen colleagues and other companies get caught up in the “Big Data” craze by spend hundreds of thousands of pounds sterling on a Hadoop cluster that sees a few megabytes [...]
MySQL Fabric support in Connector/Python
Employee +0 Vote Up -0Vote Down

MySQL Fabric was officially introduced during Tomas his keynote at MySQL Connect 2013. MySQL Fabric will help you managing lots of MySQL server supporting both high-availability and sharding. Just like Connector/J, MySQL Connector/Python v1.1.1 Alpha has support for MySQL Fabric on MySQL Labs. Note that the MySQL Fabric as well as support for it in Connector/Python is Alpha.

When you download MySQL Connector/Python from MySQL Labs, you will also see a ZIP

  [Read more...]
Tips to Build a Fault-tolerant Database Application
Employee +0 Vote Up -0Vote Down
Applications should be written taking into account that errors will eventually happen and, in particular, database application developers usually consider this while writing their applications.

Although the concepts required to write such applications are commonly taught in database courses and to some extent are widely spread, building a reliable and fault-tolerant database application is still not an easy task and hides some pitfalls that we intend to highlight in this post with a set of suggestions or tips.

In what follows, we consider that the execution flow in a database application is characterized by two distinct phases: connection and business logic. In the connection phase, the application connects to a database, sets up the environment and passes the control to the business logic phases. In this phase, it gets inputs



  [Read more...]
Showing entries 1 to 30 of 259 Next 30 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.