how to connect mysql in python scripts???

pmz132167

New Member
Messages
4
Reaction score
0
Points
0
I am new hear ...
when i tried to connect to mysql , the code does not work !
PHP:
#!/usr/bin/env python

import os
print "Content-type: text/html\r\n\r\n";

try:
   import MySQLdb
except Exception, e:
   print e

it says No module named MySQLdb ...

could you tell me how to connect mysql in python scripts???:confused::confused:
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
We do not support perl/python on free hosting.

EDIT: and if this isn't for your free hosting account, sounds like you should install the MySQLdb module, a quick google search should turn up where to get it.
 
Last edited:
Top