Subject Re: Cannot connect to a local database
Author phil_hhn
--- In, Lester Caine <lester@l...> wrote:
> phil_hhn wrote:
> > BTW, how can I connect to their server without specifying the database
> > file? I.e as a client I expect to be able to just specify an IP and
> > port (defaults to 3050, right? but where can I change it...), but
> > seems I have to specify the database file also (is this going to work
> > when it's on their machine?). I can understand this may be necessary
> > to specify on the server end, but the client should just be able to
> > connect to the database on a particular IP & port, without specifying
> > the underlying database file, right?
> Wrong, but add an entry to the aliases.conf file, and you only need a
> simple name on the client end. The server will connect to any database
> at it's end, and will NOT tell you what is available, so you have to
> for the one you want.

Yep I know a server can have multiple databases...
I thought I'd be able to serve up (eg) c:\Database0 on port 3050 as a
default (and optionally c:\temp\Database1 on port 3051,
c:\temp\Database2 on port 3052, etc.), so a client just connects to an
IP and a pre-determined port for a particular database.

Having aliases, nice - but is that platform-specific
( page 16350.html suggests its for win32 only :-( )?
Eg. We may have one install with a server on XP and MAC & linux
clients connecting to it, and another setup with the server on linux
and windows & MAC clients connecting to it. This is why it's nice for
a client to be able to simply connect on a known port (and server
machine name discovered via DNS) to get the database service.

By having to specify the database file on the client end, the clients
need to know what type of file system the DB is on (to construct the
correct path), and this can change from one linux server to the next,
depending on how particular a linux admin is...
And if the OS of the database platform were to change (ignore the IP
because it could still be the same or the client finds it via same
hostname) then all the clients need to be updated if the file system
requires the database path to be constructed differently.

Basically I was hoping that I could tie one database to one port (may
also be easier for the server, knowing it can have a separate process
for each port, and not have to multiplex requests to multiple
databases on the same port :-) ).