KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have installed MySQLdb for Python and I am able to import MySQLdb. Now I try to connect to the MySQL Community Server on my local machine, using this code: db=MySQLdb.connect( host="localhost", user="br_admin", passwd="blabla", db="br_brain" ) This code fails with this error: Traceback (most recent call last): File "<pyshell#22>", line 5, in <module> db="brainse_brain" File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 81, in Connect return Connection(*args, **kwargs) File "C:\Python27\lib\site-packages\MySQLdb\connections.py", line 187, in __init__ super(Connection, self).__init__(*args, **kwargs2) OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)") How do I resolve this error?
Tags (comma-separated)
Save Edits
Cancel