connect with MySQL question

P

pengz1

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!
 
B

bobb

This was just recently asked, I believe.
google for mysql client.

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
 

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

Forum statistics

Threads
474,184
Messages
2,570,978
Members
47,561
Latest member
gjsign

Latest Threads

Top