help : Problem in connection(python with mysql)
Posted by:
satheesh
Date: October 20, 2006 01:22AM
Hi,
i got the following error while connecting,
"---
conn = MySQLdb.connect(host="localhost", user="root", passwd="testpass", db="ex_site")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 66, in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 134, in __init__
super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")
---"
please any one hlep me to solve this problem
Following version are used in my system
Python 2.4.2 (#1, May 2 2006, 08:13:46)
[GCC 4.1.0 (SUSE Linux)] on linux2
mysql : 4.0.25-standard
Thanks
satheesh