I have set up the scenario you describe below and got a dummy connection
running - even though 'make test' of DBD::mysql massively complained about
not finding a database server ... I only looked in the DBI manual and in
Tim's and Alligator's book but not in the DBD::mysql doc where the syntax is
given:

$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";

I was surprised too that there is not much to find (i.e. I could not find
it) about this problem ... we thought it would be a good idea for several
reasons (security, performance, backups) to physically separate the two
servers. I also was told that working on separate servers brings down the
performance. We have not yet started performance tests - does anybody know
anything about that subject?

Thanks a lot to all who helped,

Herbert Braun

> -----Ursprungliche Nachricht-----
> Von: Hardy Merrill [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 25. August 2003 16:58
> An: Herbert Braun
> Cc: [EMAIL PROTECTED]
> Betreff: Re: Database and Web Server on Different Machines
>
>
> Tim or anyone else who knows, I was going to attempt to answer
> this question, but it's been a long while since I've had to
> setup a similar "dbserver on one machine, and webserver(db
> client) on another machine" scenerio, so I went looking for
> docs to describe it.  I can't find any that describe what
> needs to be installed on what machine in order to accomplish
> this.
>
> Here's what I think:
>   dbserver
>      - install and setup MySQL *server* and get working
>        properly
>      - install DBI
>
>   webserver (db client)
>      - install MySQL *client*
>      - install DBI
>      - install DBD::mysql
>
> but I honestly can't remember.  I've looked quickly through
> the DBI and DBD::mysql perldocs,  and through the DBI FAQ at
> http://dbi.perl.org/doc/faq.html, but I can't find this
> described.  Seems to me that this can be described in a
> generic way(db independent) in 'perldoc DBI', or more
> specifically in each DBD::??.
>
> I'd check the book "Programming the Perl DBI" which I think(?)
> describes this, but I don't have it handy.  Besides, this
> info is basic enough that it should be available in the
> docs somewhere.  Maybe it is, but I couldn't find it - if it
> is in the docs, please point it out to me and I'll go hide
> in a corner ;-)
>
> Thanks.
>
> --
> Hardy Merrill
> Red Hat, Inc.
>
> Herbert Braun [EMAIL PROTECTED] wrote:
> > Hello DBI users,
> >
> > I try to set up a MySQL database with a web interface via DBI.
> Database and
> > Apache web server run on different machines (both Debian
> Linux), and this is
> > where my problems start.
> >
> > - is it possible to communicate to the remote database server
> with a syntax
> > like
> >   my $dbh = DBI->connect('dbi:mysql:[EMAIL PROTECTED]',
> 'user', 'pw') ?
> >
> > - in "Programming the Perl DBI", chapter 8, Alligator and Tim
> explain how to
> > set up a database proxy. Do I have to do that? That chapter read like a
> > whole bunch of trouble ...
> >
> > - is there a way to properly install DBD::mysql without
> installing MySQL on
> > the web server? The documentation said that I had to install
> only the MySQL
> > client but almost all setup tests failed because of 'could not
> connect to
> > MySQL server' (of course it couldn't ...). I tried to direct the test
> > routines to the remote database but failed.
> >
> > Thanks in advance to anyone who can help!
> >
> > Greetings from Berlin,
> >
> > Herbert Braun
>

Reply via email to