labete Posted June 18, 2010 Report Posted June 18, 2010 Sorry, I found out by myself. I leave the topic in case it could help someone Hi! I am trying to install a local mysql server to use with python. Fail so far: the mini servers 11 and 12 seem to work fine: I can browse the user table in mysql db.I have python 2.6 installed alongside mysql-python1.2.3 But I cannot connect to the mini server thru python: import MySQLdbc=MySQLdb.connect(host="127.0.0.1:3312",user="root",passwd="test",db="mysql") orc=MySQLdb.connect("localhost:3311","root","test","mysql") or any combination of the above outputs ST like:OperationalError: (2005, "Unknown MySQL server host '127.0.0.1:3312' (11001)") So, do I do anything wrong? Any advice?ThanksOne has to type instead:c=MySQLdb.connect(host="127.0.0.1", port=3312,user="root",passwd="test",db="mysql")orc=MySQLdb.connect("localhost","root","test","mysql", 3312) HTH n sorry if i botherd you. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.