Hi,

I want to set up an API to MonetDBwith Python. I have followed the instructions£¨https://www.monetdb.org/Documentation/Manuals/SQLreference/Programming/Python£©and plan to make connection to my DB with this Python statement:
import pymonetdb;
connection=pymonetdb.connect(username="monetdb",password="monetdb",hostname="127.0.0.1",database="testdb")
But I got the following ERROR:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lingbin/maizegenome/maizedbfarm/testpy/local/lib/python2.7/site-packages/pymonetdb/__init__.py", line 48, in connect
return Connection(*args, **kwargs)
File "/home/lingbin/maizegenome/maizedbfarm/testpy/local/lib/python2.7/site-packages/pymonetdb/sql/connections.py", line 55, in __init__
unix_socket=unix_socket, connect_timeout=connect_timeout)
File "/home/lingbin/maizegenome/maizedbfarm/testpy/local/lib/python2.7/site-packages/pymonetdb/mapi.py", line 139, in connect
self.socket.connect((hostname, port))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused

Do you have a hint for me how to solve this error? Many thanks, Lingbin