Topic: Pyton koneksi dengan mysql

mau tanya dong, saya masih newbie ni dengan phyton.
masalah saya kenapa setiap membuat koneksi di phyton dengan mysql selalu erorr,
berikut script yang saya buat.

>>> import MySQLdb
>>> conn =  MySQLdb.connect("localhost","root","db_mysql")

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    conn =  MySQLdb.connect("localhost","root","db_mysql")
  File "C:\Python27\lib\site-packages\MySQLdb\__init__.py", line 82, 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)")
>>>

Mohon bantuannya ^^

Re: Pyton koneksi dengan mysql

Looks like MySQL server isn’t running. Or the name «localhost» does not point to 127.0.0.1, if TCP connection us used.