connect with MySQL question

pengz1 at netzero.com pengz1 at netzero.com
Fri Apr 9 00:15:56 EDT 2004


Hi! All 
I download MySQL to Python interface software and get MySQLdb module etc installed. But when I start mysqld on XP from c:\mysql\bin (all in windows) and use following code to connect MySQL it fails

# Database access
import MySQLdb
con=MySQLdb.connect(host="127.0.0.1",port=3306,user="root",passwd="mypasswd",db="smalldb")
Cursor=con.cursor()
sql_cmd="select * from customers"
Cursor.execute(sql_cmd)
results=Cursor.fetachall()
con.close()


It asked for client upgrade. What that mean? MySQL is 4.0
Anyone can help? 
Thanks in advance. 

Regards 
Zhiyong

________________________________________________________________
The best thing to hit the Internet in years - NetZero HiSpeed!
Surf the Web up to FIVE TIMES FASTER!
Only $14.95/ month -visit www.netzero.com to sign up today!




More information about the Python-list mailing list