Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo User (http://www.linux-archive.org/gentoo-user/)
-   -   Two instances of MySQL Database Server (http://www.linux-archive.org/gentoo-user/62462-two-instances-mysql-database-server.html)

"Kaushal Shriyan" 04-01-2008 12:56 PM

Two instances of MySQL Database Server
 
Hi

I am referring to
http://dev.mysql.com/doc/refman/5.0/en/multiple-unix-servers.html to
create multiple instances of MySQL Database Server. I wanted it for
Gentoo Linux

is there a HowTo for configuring multiple instance of MySQL Database
Server on Gentoo Linux

Thanks and Regards

Kaushal
--
gentoo-user@lists.gentoo.org mailing list

Johann Schmitz 04-01-2008 07:48 PM

Two instances of MySQL Database Server
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

About several month ago I got 2 mysql instances (4.xx and 5.xx) running on the same machine.

The (very) quick guide:

* Emerge, setup, etc mysql in the outer system
* setup a chroot with an complete stage3
* chroot into the new one
** emerge mysql
** setup mysql (use a different ip or at least a different port then the outer system!)
** Note: You have to uncomment the "need net" line in the mysql init script, cause the network is already up
* Mount /usr/portage/, /dev/, /proc/ with bind in the chroot
* Create a fake initscript wich simply invokes the mysql initscript in the chroot
** Add this one to the default runlevel

I wrote a step-by-step guide, but: Its in german ;)
Maybe i find some time to translate it into englisch...


br,

Johann



Kaushal Shriyan schrieb:
| Hi
|
| I am referring to
| http://dev.mysql.com/doc/refman/5.0/en/multiple-unix-servers.html to
| create multiple instances of MySQL Database Server. I wanted it for
| Gentoo Linux
|
| is there a HowTo for configuring multiple instance of MySQL Database
| Server on Gentoo Linux
|
| Thanks and Regards
|
| Kaushal

- --
Johann Schmitz
http://www.j-schmitz.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH8pF+ZsUt7MqpQk0RArADAKCKMNbC1CcCUpWUy1ZJ3w +RBp/7lQCfYB4u
jjCYD3I1yUAk/oIGxsDLN5s=
=0duh
-----END PGP SIGNATURE-----
--
gentoo-user@lists.gentoo.org mailing list

"Daniel da Veiga" 04-03-2008 08:39 PM

Two instances of MySQL Database Server
 
On Tue, Apr 1, 2008 at 4:48 PM, Johann Schmitz <johann@j-schmitz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> About several month ago I got 2 mysql instances (4.xx and 5.xx) running on
> the same machine.
>
> The (very) quick guide:
>
> * Emerge, setup, etc mysql in the outer system
> * setup a chroot with an complete stage3
> * chroot into the new one
> ** emerge mysql
> ** setup mysql (use a different ip or at least a different port then the
> outer system!)
> ** Note: You have to uncomment the "need net" line in the mysql init
> script, cause the network is already up
> * Mount /usr/portage/, /dev/, /proc/ with bind in the chroot
> * Create a fake initscript wich simply invokes the mysql initscript in the
> chroot
> ** Add this one to the default runlevel
>
> I wrote a step-by-step guide, but: Its in german ;)
> Maybe i find some time to translate it into englisch...
>
>

I don't understand why use a chroot to simply run another instance of
MySQL. Is there any good reason?
All you gotta do is create a new configuration file that points to a
different database location and uses a different port, and clone and
edit another /etc/init.d/mysql script to point to the new config file.

A chroot would be just a waste of space, since you can use the same
binary for multiple instances.
--
gentoo-user@lists.gentoo.org mailing list

kashani 04-03-2008 09:18 PM

Two instances of MySQL Database Server
 
Daniel da Veiga wrote:

I don't understand why use a chroot to simply run another instance of
MySQL. Is there any good reason?
All you gotta do is create a new configuration file that points to a
different database location and uses a different port, and clone and
edit another /etc/init.d/mysql script to point to the new config file.

A chroot would be just a waste of space, since you can use the same
binary for multiple instances.


About the only reason to run multiple instances is testing different
versions hence the chroot.


kashani
--
gentoo-user@lists.gentoo.org mailing list

"Daniel da Veiga" 04-03-2008 09:51 PM

Two instances of MySQL Database Server
 
On Thu, Apr 3, 2008 at 6:18 PM, kashani <kashani-list@badapple.net> wrote:
> Daniel da Veiga wrote:
>
> > I don't understand why use a chroot to simply run another instance of
> > MySQL. Is there any good reason?
> > All you gotta do is create a new configuration file that points to a
> > different database location and uses a different port, and clone and
> > edit another /etc/init.d/mysql script to point to the new config file.
> >
> > A chroot would be just a waste of space, since you can use the same
> > binary for multiple instances.
> >
>
> About the only reason to run multiple instances is testing different
> versions hence the chroot.
>

The OP asked about different instances, not versions.
Isn't MySQL slotted, so you can run different major versions (4 and 5,
for example) at the same time?

--
Daniel da Veiga
--
gentoo-user@lists.gentoo.org mailing list

kashani 04-04-2008 12:06 AM

Two instances of MySQL Database Server
 
Daniel da Veiga wrote:

On Thu, Apr 3, 2008 at 6:18 PM, kashani <kashani-list@badapple.net> wrote:

Daniel da Veiga wrote:


I don't understand why use a chroot to simply run another instance of
MySQL. Is there any good reason?
All you gotta do is create a new configuration file that points to a
different database location and uses a different port, and clone and
edit another /etc/init.d/mysql script to point to the new config file.

A chroot would be just a waste of space, since you can use the same
binary for multiple instances.


About the only reason to run multiple instances is testing different
versions hence the chroot.



The OP asked about different instances, not versions.


true, but again one of the few rational reasons to do this is to test
multiple versions. Otherwise it's an efficient way to split your system
resources in half. The OP could look at /etc/init.d/mysqlmanager which
seems to support the idea of instances, but I'm not sure it would be
useful outside running the same binary on a different port.



Isn't MySQL slotted, so you can run different major versions (4 and 5,
for example) at the same time?



Not slotted in any meaningful within the system. You have to chroot.
There was an attempt to do it within Gentoo a few years back, but it
overly complicated for the average user and poorly implemented.


kashani
--
gentoo-user@lists.gentoo.org mailing list


All times are GMT. The time now is 09:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.