Connecting to Firebird database using Kinterbasdb+Python

Maurice LING mauriceling at acm.org
Mon Jul 4 19:35:25 EDT 2005


Mathias Waack wrote:
> Maurice LING wrote:
> 
> 
>>I've been using FB1.5 and access the database using Kinterbasdb +
>>Python. My connection is established using kinterbasdb.connect() method
>>and the parameters host, dns, database, user, password are all defaulted
>>to 'None'.
>>
>>On my own machine running Mac OSX 10.3, I can connect using the following:
>>host = 'localhost'
>>database = '<my path to FB database>'
>>user = '<user>'
>>password = '<password>'
>>
>>At the same time, I can also connect if I set host=None on my machine.
>>
>>However, I cannot use 'localhost' on a shared Linux machine (not
>>allowed. Don't ask why, system admin's mandate. And the Linux machine is
>>without inetd). So when I set host=None, I get this error:
> 
> 
> Just for my understanding: if you start your script on the machine hosting
> the DB you're able to connect. If you start it on a different machine, you
> are not able to connect without giving a hostname? Whats wrong with
> offering the the name (or IP-address) of your MacOS-box instead of
> 'localhost' to the script?
> 

Hi Mathias,

What I am trying to do is "port" a workable program from my own machine 
(Mac OSX) to a larger machine (Linux). So, the DB and the program are 
also on the same Linux machine.

On the Linux machine, I cannot use localhost, so I set host parameter in 
kinterbasdb.connect() method to None, which is the default kinterbasdb 
uses. On Linux machine, I get the error as posted. On my Mac OSX 
machine, initiating host parameter to 'localhost' or None has no 
difference, it works.

Thanks and cheers
Maurice



More information about the Python-list mailing list