Koozali.org: home of the SME Server

Running Multiple MySQL Instances on SME

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Running Multiple MySQL Instances on SME
« on: December 09, 2013, 07:01:05 PM »
I would like to be able to install another server instance of MySQL that does not interfere with the MySQL installation that runs SME Server.

I broached this subject once before here:

http://forums.contribs.org/index.php/topic,46327.msg227041.html

I looked into this again and found some information here:

http://dev.mysql.com/doc/refman/5.5/en/multiple-servers.html

http://lasanthals.blogspot.com/2012/09/running-multiple-instances-of-mysql-on.html

http://www.howtoforge.com/running-mysql4-and-mysql5-concurrently

There is a New Feature Request posted here that I saw in response to my first inquiry on the subject:

http://bugs.contribs.org/show_bug.cgi?id=2301


Has anyone ever managed to do this?  Has anyone ever tried and failed?  Can anyone say whether this is possible on SME or not and what would be the best way to approach it on SME?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Running Multiple MySQL Instances on SME
« Reply #1 on: December 09, 2013, 08:46:26 PM »
I have no solution but a question: why?

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #2 on: December 09, 2013, 09:32:30 PM »
Good question.

For a website on my SME server, I need the features of a later version of MySQL.  The version that SME distributes with does not have those features and an upgrade pathway for that version does not exist.  If you try to upgrade, the Hoard mail website breaks down and other things too, if I recall.  I tried once and it was a total disaster.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Running Multiple MySQL Instances on SME
« Reply #3 on: December 09, 2013, 09:41:34 PM »
in this case you could install a plain VM with Centos or another distro, install there mysql in the desired/needed version, use it as db backend.. you're done.. :-)

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #4 on: December 09, 2013, 09:47:04 PM »
in this case you could install a plain VM with Centos or another distro, install there mysql in the desired/needed version, use it as db backend.. you're done.. :-)

The idea of getting into virtually installed operating systems makes my blood run cold.  Perhaps you could give me a brief sketch of how to make such an installation and how I would apply the MySQL database in such an installation.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Running Multiple MySQL Instances on SME
« Reply #5 on: December 09, 2013, 10:10:16 PM »
virtualization is simple and you can test almost everything..

I don't know which version of mysql do you need, but you can follow any of the hundreds howto out there to virtualize your favourite O.S.

start from here: http://www.howtoforge.com

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #6 on: December 10, 2013, 12:34:04 AM »
"Your hardware must support virtualization".

On this thread, let us consider virtualization off topic.

Again, I am interested in how to set up multiple instances of MySQL on SME.  Anyone have any clues about doing this on SME?

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Running Multiple MySQL Instances on SME
« Reply #7 on: December 10, 2013, 04:53:36 AM »
I have installed 'mariadb' using their 'alongside' installation instructions.  So far, so good.

My notes are here:
http://wiki.contribs.org/User_talk:Mmccarn#Install_mariadb_.27alongside.27_mysql


I've got Moodle 2.6 running using this version of mariadb.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #8 on: December 10, 2013, 05:51:58 AM »
I have installed 'mariadb' using their 'alongside' installation instructions.  So far, so good.

My notes are here:
http://wiki.contribs.org/User_talk:Mmccarn#Install_mariadb_.27alongside.27_mysql


I've got Moodle 2.6 running using this version of mariadb.

That looks encouraging.  I'll check it out.  Moodle looks interesting too.

Thanks for posting.

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Running Multiple MySQL Instances on SME
« Reply #9 on: December 10, 2013, 08:11:09 AM »
I have installed 'mariadb' using their 'alongside' installation instructions.  So far, so good.

The way things are going Mariadb will replace MySQL in more than a few open source distros..
--
qui scribit bis legit

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Could we use this 'alongside' procedure on MySQL?
« Reply #10 on: December 12, 2013, 07:54:55 PM »
I have installed 'mariadb' using their 'alongside' installation instructions.  So far, so good.

My notes are here:
http://wiki.contribs.org/User_talk:Mmccarn#Install_mariadb_.27alongside.27_mysql


I am happy to make this move to mariadb, especially if SME intends to migrate to mariadb sometime in the future.  But, as a point of reference, since mariadb is a fork of MySQL, couldn't this 'alongside' procedure also be applied to some other version of MySQL?

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Running Multiple MySQL Instances on SME
« Reply #11 on: December 12, 2013, 10:57:27 PM »
Well, dev.mysql.com has a page for 'multiple mysql instances on Unix':
http://dev.mysql.com/doc/refman/5.7/en/multiple-unix-servers.html

...But the instructions seem to start with "./configure", which always puts me off.

I setup mariadb because their website had easy(ish) instructions that didn't require compiling from source.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #12 on: December 12, 2013, 11:16:02 PM »
Well, dev.mysql.com has a page for 'multiple mysql instances on Unix':
http://dev.mysql.com/doc/refman/5.7/en/multiple-unix-servers.html

...But the instructions seem to start with "./configure", which always puts me off.

I setup mariadb because their website had easy(ish) instructions that didn't require compiling from source.

Might be worth a try.  But I'm going to try mariadb first.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Running Multiple MySQL Instances on SME
« Reply #13 on: December 13, 2013, 12:06:46 AM »
LANMonkey

This thread
http://forums.contribs.org/index.php/topic,50081.0.html
has details re how to install a later version of mysql & Moodle.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline LANMonkey

  • *****
  • 350
  • +0/-0
    • Database Collection of Transcripts for the ICTY
Re: Running Multiple MySQL Instances on SME
« Reply #14 on: December 13, 2013, 12:17:45 AM »
LANMonkey

This thread
http://forums.contribs.org/index.php/topic,50081.0.html
has details re how to install a later version of mysql & Moodle.

I'll try that too.

But meanwhile, I managed to follow mccarn's instruction at the link provided and successfully display,

Code: [Select]
+--------------------+
| VERSION()          |
+--------------------+
| 5.5.34-MariaDB-log |
+--------------------+

I just copied and pasted the instructions, line by line from the "Raw notes on mariadb installation" into my PuTTY command line and enter.

I saw some differences.

First, /etc/init.rd in my SME 9 beta 3 is a link to /etc/rc.d/init.d.  That was a little disorienting, but the file to change was there.

I didn't see any instructions to add a group "mariadb".  When I tried, it rejected mariadb as being already used as a user name and I had to use a different name and make the appropriate changes in the instructions.

Also, testing access with,

Code: [Select]
mysql -e "SELECT VERSION();" --port=3307 --protocol=TCP -p
didn't work until I did a reboot.  And, it did not need an actual password to work, you just a get a prompt for a password and hit "enter" and that should do it.  Same for the example version check.  My SME did not ship with a  password for MySQL's root and we are not advised anywhere to add one.

Now to applications to see how MariaDB works with my databases.
« Last Edit: December 13, 2013, 12:22:55 AM by LANMonkey »