List:General Discussion« Previous MessageNext Message »
From:Hal Vaughan Date:February 17 2005 4:21am
Subject:Re: Using Different Database Groups On the Same Computer
View as plain text  
On Wednesday 16 February 2005 08:52 pm, Hal Vaughan wrote:
> I'm not quite sure what search terms to use, otherwise I'm sure I could
> find this on Google.
>
> I have a working install of MySQL on an older computer, running the current
> version of my program.  I am about to start developing a newer version of
> my program on a new computer.  I'd like to have both versions (current and
> new) on the same computer, however, that will cause a LOT of problems in
> interference between the current and development versions of my program.
>
> Is there any way to separate these, so I can run mysql one way to access
> the databases for the current version, and run it another way to access the
> newer databases for the development version (and yes, many databases in the
> development version will have the same name as those in the current
> version).
>
> For example, if I ran a command "mysql", I'd get these tables:
>
> CaseData
> Clients
> GeneralSetup
>
> And if I ran an alias, like, say, "new-mysql", I'd get these tables:
>
> CaseData  (same name, different table)
> Clients  (same name, different table)
> GeneralSetup  (same name, different table)
> DataFilters
>
> I am running MySQL on Linux, if that makes a difference.
>
> Hal

I've tried this by running 2 instances of mysqld, the first with no arguments, 
and the second like this:

mysqld --port=3307 --datadir=/dbtest/mysql

I have to run mysqld directly -- not through safe_mysqld 
(which /etc/init.d/mysql calls).  If I run it through safe_mysqld, I can run 
only one instance at a time, it will exit without running a new instance if 
it detects one already running.

In all test cases, I've always run the plain version first, and the one using 
the 2nd port and new data dir last.  No matter what I do, it always uses the 
new data dir, whether I try "mysql" or "mysql --port=3307".

Any ideas?

The goal is to have 2 instances of MySQL running on the same computer 
(preferably without needing 2 different versions or 2 different installs), 
with each instance using different data directories (and, of course, to reach 
the separate instances, each listens on a different port).

Thanks for any help.

Hal
Thread
Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
  • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
    • Re: Using Different Database Groups On the Same ComputerHassan Schroeder17 Feb
      • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
        • Re: Using Different Database Groups On the Same ComputerHassan Schroeder17 Feb
          • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
            • Re: Using Different Database Groups On the Same ComputerHassan Schroeder17 Feb
              • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
        • Re: Using Different Database Groups On the Same ComputerKristen G. Thorson17 Feb
RE: Using Different Database Groups On the Same ComputerSST - Adelaide)17 Feb
  • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
RE: Using Different Database Groups On the Same ComputerSST - Adelaide)17 Feb
  • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb
RE: Using Different Database Groups On the Same ComputerSST - Adelaide)17 Feb
  • Re: Using Different Database Groups On the Same ComputerHal Vaughan17 Feb