I am using MySQL 5.0 beta and Active Python 2.4. I have the correct
version of MySQLdb installed. The problem is that I can't connect to
MySQL through the Active Python interactive window.
Here is a sample error:
c=MySQLdb.Connect(host='localhost',user='root',pas swd='',db='shop',port=3306) Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python24\Lib\site-packages\MySQLdb\__init__.py", line 66, in
Connect
return Connection(*args, **kwargs)
File "C:\Python24\Lib\site-packages\MySQLdb\connections.py", line
134, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on 'localhost'
(10061)")
Please look at the penultimate line again. Here the self argument is
placed second to Connection argument. So I reversed their position. But
the problem persists.
Here is a sample:
c=MySQLdb.Connect(host='localhost',user='root',pas swd='',db='shop',port=3306)
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "C:\Python24\Lib\site-packages\MySQLdb\__init__.py", line 66, in
Connect
return Connection(*args, **kwargs)
File "C:\Python24\Lib\site-packages\MySQLdb\connections.py", line
134, in __init__MyM
super(self,Connection).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on 'localhost'
(10061)")
What is happening?
Thanks in advance for any help
Regards
Mondal