How to use MySQL without MySQLdb module

Alan Franzoni alan.franzoni.xyz at gmail.com.invalid
Wed Dec 6 04:33:13 EST 2006


Jia Lu  si è divertito a scrivere:

> Hi all.
>  I am using a hosting space with python cgi.
>  But this host haven't got MySQLdb installed.

Are you sure there's no other mysql db interface installed? If the DB is on
the very same server, it should be. If it isn't, and you'd like to access
an external firewall, you should check whether the firewall of your host
really allows outbound connections.

If it does, you should look for (or write by yourself) a pure-python db-api
implementation of mysqldb.

Otherwise, you could connect directly to the port of your mysql database
and just write raw sql and pull raw data from it, but this will prevent you
from the chance of using more enhanced db tools like sqlalchemy, and it's
highly discouraged as well as it's really prone to errors.

-- 
Alan Franzoni <alan.franzoni.xyz at gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
Remove .xyz from my address in order to contact me.
-
GPG Key Fingerprint (Key ID = FE068F3E):
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E 



More information about the Python-list mailing list