Python and MySQL

I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I can't install on the host.

I found bpgsql really good because it does not require an install, it's a single file that I can look at, read and then call the functions of. Does anybody know of something like this for MySQL?

This question and answers originated from www.stackoverflow.com
Question by (8/3/2008 5:44:07 PM)

Answer

MySQLdb is what I have used before.

If you host is using Python version 2.5 or higher, support for sqlite3 databases is built in (sqlite allows you to have a relational database that is simply a file in your filesystem). But buyer beware, sqlite is not suited for production, so it may depend what you are trying to do with it.

Another option may be to call your host and complain, or change hosts. Honestly these days, any self respecting web host that supports python and mysql ought to have MySQLdb pre installed.

Answer by

Find More Answers
Related Topics  python  mysql  postgresql
Related Questions
  • MySQL and Python

    I'm having some troubles updating a row in a MySQL db. Here is the code I'm trying to run: import MySQLdb conn=MySQLdb.connect(host="localhost", user="root", passwd="pass", db="dbname") cursor=c…
  • MYSQL and python error

    I want to insert data in MYSQL database using python here my code import MySQLdb #connect to db db= MySQLdb.connect(host= "localhost", user="root", passwd="newpassword", db=…
  • Python and MySQL

    Is there an easy way (without downloading any plugins) to connect to a MySQL database in Python? Also, what would be the difference from calling a PHP script to retrieve the data from the databas…
  • Python 3 and mysql

    I am using activestate python 3 on windows and wanted to connect to my mysql database. I heard that mysqldb was the module to use. I can't find mysqldb for python 3. Is there a repository availab…
  • Python processes and MySQL

    I am running several thousand python processes on multiple servers which go off, lookup a website, do some analysis and then write the results to a central MySQL database. It all works fine for a…
  • pinging mysql using mysql alchemy and python

    how do i ping mysql using mysql alchemy and python?
  • Python and MySQL compile version

    How do I check if my python and mysql are 32 bit installations or 64 bit?
  • Python MySQL and Django problem

    I am having problems getting python/django to connect to a MySQL database. The error message is basically "Error Loading MySQLDb module: No module named MySQLDb". This is a fresh install right of…
  • Mismatch between MySQL and Python

    I know the mismatch between Object Oriented Technology and the Relational Technology, generally here . But I do not know the mismatch between MySQL and Python, and other tools, not just ORMs, to…
  • Problem with Python and MySQL

    I am trying to import a large text file into a MySQL database. The SQL statement is as follows: LOAD DATA INFILE '/tmp/epf/full/album_popularity_per_genre' INTO TABLE album_popularity_per_genre …