Sorry, I found out by myself. I leave the topic in case it could help someone One has to type instead: c=MySQLdb.connect(host="127.0.0.1", port=3312,user="root",passwd="test",db="mysql") or c=MySQLdb.connect("localhost","root","test","mysql", 3312) HTH n sorry if i botherd you.