0

I currently have mysql 5.5 installed, and working.

I'd like to migrate everything to mysql 5.7 (for a number of reasons, but mostly the spatial functions).

I would like to have both 5.5 and 5.7 be running at the same time on the same box.

How can I do that?

2 Answers 2

1

There are problems here in attempting to do what you are asking and keeping your package manager happy.

Off the top, I see two choices here:

  1. compile/install from scratch to an entirely different directory hierarchy

  2. If I recall, there is a way to install packages using a different base root directory. Do that and then manually make the necessary changes.

Either way, there could be some effort involved.

1
  • How do I do #2?
    – soandos
    Aug 7, 2014 at 18:48
0

It is possible to have both MySQL servers running on the same machine but, it'll take some work.

First you would need to install 5.7 in a different directory than 5.5. Also since MySQL uses a default port, you would need to run 5.7 on a different port.

You're basically creating an entire new MySQL server

update-alternatives is a program that could work for you as well. (I have not tested this)

update-alternatives --install /usr/bin/mysql-server mysql-server /usr/bin/mysql-5-1/bin/mysql-server 10
update-alternatives --install /usr/bin/mysql-server mysql-server /usr/bin/mysql-5-6/bin/mysql-server 10 

--install adds a new mapping

/usr/bin/mysql-server is the link location (where mysql-server normally is located)

mysql-server is the name of the mapping /usr/bin/mysql-5-6/bin/mysql-servera is where I placed the new version of mysql-server

10 is the priority

You then choose which version of mysql-server you want like so

update-alternatives --set mysql-server /usr/bin/mysql-5-6/bin/mysql-server
4
  • How can I install it to a different folder?
    – soandos
    Aug 7, 2014 at 19:00
  • I think the easiest way to accomplish this would be to use, [mysqlsandbox.net/index.html], kind of a virtualization, if you just want to test out 5.7, then upgrade later.
    – user300217
    Aug 7, 2014 at 19:40
  • Edit the comment to fix
    – soandos
    Aug 7, 2014 at 19:41
  • mysqlsandbox.net/index.html I also updated my answer with another option
    – user300217
    Aug 7, 2014 at 19:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .