Jump to content
The Uniform Server Community

python & mysql


Recommended Posts

Sorry, I found out by myself. I leave the topic in case it could help someone




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 MySQLdb





any combination of the above outputs ST like:

OperationalError: (2005, "Unknown MySQL server host '' (11001)")


So, do I do anything wrong? Any advice?


One has to type instead:

c=MySQLdb.connect(host="", port=3312,user="root",passwd="test",db="mysql")


c=MySQLdb.connect("localhost","root","test","mysql", 3312)


HTH n sorry if i botherd you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...