
I'm having problems connecting to a MonetDB 5 SQL database via the Python interface. I am working on a Mac OS X (10.5.6) system, with python 2.5.1. I downloaded and compiled the Feb 2009 SP2 release from source and added the appropriate directory to my PYTHONPATH. When running the connect command, I get some errors:
import MonetSQLdb x = MonetSQLdb.connect(host='greensburg.local',user='scott',password='notmyrealpassword',lang='sql',dbname='HistoricalData') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "MonetSQLdb/__init__.py", line 131, in __init__ self._mapi = Mapi(kwargs['host'], kwargs['port'], kwargs['user'], kwargs['password'], kwargs['lang'], kwargs['dbname']) File "MonetDB/CMapi.py", line 30, in __init__ raise IOError(self.error_str()) IOError: !InvalidCredentialsException:checkCredentials:Invalid credentials for user 'scott'
I have checked and double checked that my user name and password are correct: I am able to login to the database from the same machine using SQL Explorer in Eclipse with the same credentials. The connection shows up in the merovingian log on the server as being proxied to the appropriate databse. The weird thing is, it doesn't show the connection ending until I quit() the python interactive session, or try connecting again, or do something else with the connection object (c = x.cursor() also causes a disconnect, and thows an exception that complains that x is not defined). Ideas anyone? The only thing I can think of that may be wrong is I'm not using the same releases of MonetDB for the python library and the server. mserver5 --version says I'm running MonetDB server v5.6.0 based on kernel v1.24.0 (I can't seem to remember/figure out which named release this corresponds to). Do the versions need to be the same? Thanks, Scott