This is driving me crazy.
I have Python 2.5 and MySQL-python-1.2.3 from the .exe available here installed on Vista.
I have been making .php
pages over the past few weeks and connected fine in order to test them in my browser.
$dbcnx=@mysql_connect("localhost", "root", "mypassword")
I have also been using mysql commandline with
mysql.exe -uroot -pmypassword just fine.
However, when I try to use MySQLdb with
conn = MySQLdb.connect(host = "localhost", user = "root", passwd = "mypassword")
I get
OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")
I have checked that MySQL is running in services. I checked my MySQL config in my.ini and it is running on port=3306. I have even uninstalled and reinstalled MySQL 5.1. I read several pages of connection problems and answers on Google, but haven't yielded anything. It must be something simple I am overlooking, but does anyone have any more ideas?