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

Displaying posts with tag: mysqldb (reset)

MySQLdb Manage Columns
+0 Vote Up -0Vote Down

Sometimes trying to keep a post short and to the point raises other questions. Clearly, my Python-MySQL Program post over the weekend did raise a question. They were extending the query example and encountered this error:

TypeError: range() integer end argument expected, got tuple.

That should be a straight forward error message because of two things. First, the Python built-in range()

  [Read more...]
Python-MySQL Program
+0 Vote Up -0Vote Down

This post works through the Python configuration of Fedora instance, and continues the configuration of my LAMP VMware instance. It covers how you add the MySQL-python libraries to the Fedora instance, and provides the students with one more language opportunity for their capstone lab in the database class.

A standard Fedora Linux distribution installs Python 2.7 by default. Unfortunately, the MySQL-python library isn’t installed by default. You can verify the Python version by writing and running the following version.py program before installing the MySQL-python library:

  [Read more...]
Does Python MySQLdb Make You Wait?
+0 Vote Up -0Vote Down

Recently while writing a data loading application for a customer, we’ve come into a problematic situation with the Python MySQLdb module that can be installed with base RHEL repository or DVD. As a little background, this application uses an HA architecture where a Virtual IP can be assigned to different servers during a failover scenario. However, during failover, as long as the VIPs are not re-assigned, the application could hang waiting for query response. A quick strace reveals something like:

sendto(5, "W\0\0\0\3SELECT * FROM dataloader.bo"..., 91, 0, NULL, 0) = 91
recvfrom(5,

Further test reveals that this problem will not timeout …

  [Read more...]
kajtajm: Planning my first Python / PyObjC / MySQLdb project
Employee +0 Vote Up -0Vote Down

Never have I planned a program so much in detail before starting coding. And stranger still, I’m planning the program to be coded in a language in which I haven’t written a single line of code. Nonetheless, I’m eager and it feels good.

I woke up early this Sunday, my mind concentrating on the many steps I will have to take before the first project will see the light of day. I had planned eight prerequisite lessons before even starting the coding. And despite receiving many good pieces of advice, nobody had relieved me of my main worry — the input grid for the data entry in matrix format.

To …

  [Read more...]
Python Mysql Connectivity
+0 Vote Up -0Vote Down

How do you configure python for use with mysql? You require the MySQLdb module for connecting to mysql server using the python code. This module is used for firing queries to the database server and handling of result sets from python code.

First of all, check if the module is available or not :

jayant@jayantbox:~$ python Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3

Showing entries 1 to 5

Planet MySQL © 1995, 2015, 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.