List:General Discussion« Previous MessageNext Message »
From:Jann Linder Date:February 9 2000 5:31pm
Subject:RE: trying to contact either mysql server (of two) running on same host.
View as plain text  
interesting side note:

when i connect to that DB machine from another server:

mysql -P10306 -uUSER -pPass -hHOSTNAME TABLE


I get the CORRECT DB AND PORT!


???
Does this help?

> -----Original Message-----
> From: Steve Ruby [mailto:stever@stripped]
> Sent: Wednesday, February 09, 2000 9:13 AM
> To: jann@stripped
> Cc: Ed Carp; mysql@stripped
> Subject: Re: trying to contact either mysql server (of two) running on
> same host.
>
>
>
>
> I believe that suggestions not to use two daemons on
> the same machine stems from:
> When using them against the same database it gains no performance,
> and unless you are doing read only it will causes data corruption.
>
> So long as you use two separate datadirs.
> You should have no problem running two daemons with separate
> port numbers and separate sock files. There is no reason you would
> have a problem they won't even know each other are there.
>
> When you connect with perl use the port number in addition to the
> machine name to connect and you will be fine.
>
> He wants to run two copies so he can have a developmetn and production
> database.
>
> Jann: consider also that if you have two different daemons you will
> need different connect strings in your code (prod vs dev), why not just
> have a
> development database in the same daemon and change that part of your
> code before production rather than the port number. you SHOULD not be
> able to run any code against the damon frm the DBI that causes it to
> crash if it is a stable version of the server.
>
> Jann Linder wrote:
> >
> > I have two versions of a site...
> >
> > the site uses around 17 databases and i wish to be able to
> develop on one
> > daemon and run the tests on the other (using apahce virtual
> hosts to keep
> > the actual web sites on the same machine).
> >
> > since both sites use some of the same databases (the test site may have
> > "older data") I do not wish to have to rename all the databases from
> > "orders" to "test_orders" etc.... to keep them on the same daemon.
> >
> > Hence, the need for two daemons...run a server, use the EXACT
> same db names,
> > have different data in them.
> >
> > Jann
> >
> > > -----Original Message-----
> > > From: Ed Carp [mailto:erc@stripped]
> > > Sent: Wednesday, February 09, 2000 8:47 AM
> > > To: jann@stripped; mysql@stripped
> > > Subject: Re: trying to contact either mysql server (of two) running on
> > > same host.
> > >
> > >
> > > Jann Linder (jann@stripped) writes:
> > >
> > > > I have consulted everything i can read about mysql daemons
> > > running on the
> > > > same machine and do not find any limitation requirement for
> using unix
> > > > sockets when talking to a server from the same machine as a
> > > client--ALSO i
> > > > am not sure perlDBI can use unix sockets...correct me if i am
> > > wrong.  I also
> > > > looked at the mailing lists for DBI and CGI and do not find hlp.
> > > >
> > > > HOW DO I contact the one at 10306 using the TCP/IP PORT and
> not the Unix
> > > > Sockets? (which i do not know how to do in perl)
> > >
> > > Senior software enginneer, huh?  I must be a CIO, then ;)
> > >
> > > The only way to open a port on a machine is with a socket.  Same
> > > thing.  You might
> > > want to read the comp.unix.programmer FAQ for a good
> discussion regarding
> > > sockets programming (actually, it's quite simple, but I digress).
> > >
> > > I also recall reading in the MySQL manual that running two MySQL
> > > instances on
> > > the same machine is not recommended.  I'm curious why you
> would want to.
> >
> > --
> > ---------------------------------------------------------------------
> > Please check
"http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread27228@stripped
>
> To unsubscribe, send a message to:
>     <mysql-unsubscribe-stever=seawingsub.com@stripped>

--
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail mysql-thread27230@stripped

To unsubscribe, send a message to:
    <mysql-unsubscribe-jann=jann.com@stripped>

Thread
trying to contact either mysql server (of two) running on same host.Jann Linder9 Feb
  • Re: trying to contact either mysql server (of two) running on same host.Steve Ruby9 Feb
    • Re: FIXED: [SOLUTION] trying to contact either mysql server (of two) running on same host.Jann Linder9 Feb
Re: trying to contact either mysql server (of two) running on same host.Ed Carp9 Feb
  • RE: trying to contact either mysql server (of two) running on same host.Jann Linder9 Feb
    • Re: trying to contact either mysql server (of two) running on same host.Steve Ruby9 Feb
      • RE: trying to contact either mysql server (of two) running on same host.Jann Linder9 Feb
      • RE: trying to contact either mysql server (of two) running on same host.Jann Linder9 Feb