mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server throug

view full story

http://forums.fedoraforum.org – I want o use python with mysql and i installed both the things . when i ran a python file which came up with messages which says Code: [root@VAIO examples]# python circle.py Traceback (most recent call last):   File "circle.py", line 36, in <module>     api = api.API()   File "/home/miriyala/Downloads/mas_framework/examples/mas_framework/api.py", line 48, in __init__     super(API, self).__init__()   File "/home/miriyala/Downloads/mas_framework/examples/mas_framework/apibase.py", line 16, in __init__     self.db = DB()   File "/home/miriyala/Downloads/mas_framework/examples/mas_framework/db.py", line 28, in __init__     self.conn = MySQLdb.connect(db = DB_NAME, host = DB_HOST, passwd = DB_PASSWD, user = DB_USER)   File "/usr/lib/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect     return Connection(*args, **kwargs)   File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 187, 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)") on the otherhand side i check wherther mysql is running or not and here is the output Code: [root@VAIO examples]# netstat -nlp | grep mysqld tcp        0      0      *                  LISTEN      1999/mysqld        unix  2      [ ACC ]    STREAM    LISTENING    15439  1999/mysqld        /tmp/mysql.sock so what might be the problem? (HowTos)