How to use MySQL without MySQLdb module

J

Jia Lu

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

Is there any methods to connect to Mysql without MySQLdb.
Or any other DB methods with original python release?

Thanx
 
A

Alan Franzoni

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 <[email protected]>
-
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top