Multiple SQL versions with DockerNo access to phpmyadminHow to connect .sql file to MySQL Server to work with application serverProblems installing MySQL ServerApt not installing most known packagesCannot install phpmyadmin on ubuntu 14.04 LTSHow can ensure that my LAMP server isn't avilable for online access?Why is the mysql-server package from mysql.com missing server files?
Why are KDFs slow? Is using a KDF more secure than using the original secret?
When to use Slots vs Public Properties vs Getter Properties in LWC exactly?
How can a "proper" function have a vertical slope?
Did smallpox emerge in 1580?
"Table" method for expanding brackets vs "each term in the first bracket gets multiplied by each term in the second bracket"
Will the size of Bitcoin core full-node be too big to run on a normal computer?
What is the design rationale for having armor and magic penetration mechanics?
7 mentions of night in Gospel of John
Is there any restriction in entering the South American countries multiple times in one year?
Why does this route work with a slash and not a dash?
Source for "no Yetzer Harah when a Torah Scroll is opened/read"?
How does Firefox know my ISP login page?
Does the warlock's Gift of the Ever-Living Ones eldritch invocation work with potions or healing spells cast on you by others?
I’m having a hard time deciding whether this is a redemption arc
Paper status "Accept with Shepherd". What does it really mean?
If the music alphabet had more than 7 letters would octaves still sound like the same note?
A tin of biscuits vs A biscuit tin, Is there any slight difference in meaning between that two phrases?
What is the German word for: "It only works when I try to show you how it does not work"?
Is there a push, in the United States, to use gender-neutral language and gender pronouns (when they are given)?
What does "綺麗" mean in this sentence?
Is it plausible that an interrupted Windows update can cause the motherboard to fail?
What does the British parliament hope to achieve by requesting a third Brexit extension?
Is fascism intrinsically violent?
How do I find files with no group permissions?
Multiple SQL versions with Docker
No access to phpmyadminHow to connect .sql file to MySQL Server to work with application serverProblems installing MySQL ServerApt not installing most known packagesCannot install phpmyadmin on ubuntu 14.04 LTSHow can ensure that my LAMP server isn't avilable for online access?Why is the mysql-server package from mysql.com missing server files?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I'm trying to find out a way to keep my actual MySQL 5.5 databases on my Ubuntu server (who's used for most of my websites in Apache2) and install another instance of MySQL 8.0 on the same server (for some other websites).
I read online that Docker could be a good idea, so I could install MySQL 8.0 on a docker. The thing is I don't know if this is the best option since I don't know docker actually.
So I'm asking you, do you think running docker is the best plan here? And if not, do you have a better idea?
I am kinda afraid that docker could override my 5.5 version when installing it on docker...
I also found the dbdeployer option, but that seems to be the same kind of thing.
Thanks for your help!
server apache2 mysql
add a comment
|
I'm trying to find out a way to keep my actual MySQL 5.5 databases on my Ubuntu server (who's used for most of my websites in Apache2) and install another instance of MySQL 8.0 on the same server (for some other websites).
I read online that Docker could be a good idea, so I could install MySQL 8.0 on a docker. The thing is I don't know if this is the best option since I don't know docker actually.
So I'm asking you, do you think running docker is the best plan here? And if not, do you have a better idea?
I am kinda afraid that docker could override my 5.5 version when installing it on docker...
I also found the dbdeployer option, but that seems to be the same kind of thing.
Thanks for your help!
server apache2 mysql
add a comment
|
I'm trying to find out a way to keep my actual MySQL 5.5 databases on my Ubuntu server (who's used for most of my websites in Apache2) and install another instance of MySQL 8.0 on the same server (for some other websites).
I read online that Docker could be a good idea, so I could install MySQL 8.0 on a docker. The thing is I don't know if this is the best option since I don't know docker actually.
So I'm asking you, do you think running docker is the best plan here? And if not, do you have a better idea?
I am kinda afraid that docker could override my 5.5 version when installing it on docker...
I also found the dbdeployer option, but that seems to be the same kind of thing.
Thanks for your help!
server apache2 mysql
I'm trying to find out a way to keep my actual MySQL 5.5 databases on my Ubuntu server (who's used for most of my websites in Apache2) and install another instance of MySQL 8.0 on the same server (for some other websites).
I read online that Docker could be a good idea, so I could install MySQL 8.0 on a docker. The thing is I don't know if this is the best option since I don't know docker actually.
So I'm asking you, do you think running docker is the best plan here? And if not, do you have a better idea?
I am kinda afraid that docker could override my 5.5 version when installing it on docker...
I also found the dbdeployer option, but that seems to be the same kind of thing.
Thanks for your help!
server apache2 mysql
server apache2 mysql
edited May 2 at 13:46
Nicolas DUVOISIN
asked May 2 at 13:30
Nicolas DUVOISINNicolas DUVOISIN
534 bronze badges
534 bronze badges
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it
When executing docker run
, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306
as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.
Note: Do not use the data directory that your current MySQL 5.5 is
using (/var/lib/mysql by default)
Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.
You can also Try the way Rinzwind suggested, that's a good way to run it as well.
Hope this helps.
add a comment
|
So I'm asking you, do you think running docker is the best plan here?
No
And if not, do you have a better idea?
Use the generic idea of what is considered the method on doing this: basically you install mysql for every version you need in a different directory and since we are talking 3rd party installs I would opt for /opt/
as that is the intended target for those kind of installs.
For mysql that would be
/opt/mysql-5.5
/opt/mysql-5.5.1
/opt/mysql-5.6
/opt/mysql-8.0
You create all the configuration inside those directories (so the my.cnf
inside those directories so you have 1 per install; if you want to run them all at the same time you need a socket and a port per mysql instance).
With a symlink to the binary in the version directories to /opt/mysql
you can also switch between the different versions.
The way to do this is more complex though. See for instance the percona site where they use /opt/
for manual install or openark.org where they use /usr/local/
(I like that method too though it does not use /opt
).
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1139969%2fmultiple-sql-versions-with-docker%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it
When executing docker run
, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306
as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.
Note: Do not use the data directory that your current MySQL 5.5 is
using (/var/lib/mysql by default)
Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.
You can also Try the way Rinzwind suggested, that's a good way to run it as well.
Hope this helps.
add a comment
|
Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it
When executing docker run
, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306
as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.
Note: Do not use the data directory that your current MySQL 5.5 is
using (/var/lib/mysql by default)
Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.
You can also Try the way Rinzwind suggested, that's a good way to run it as well.
Hope this helps.
add a comment
|
Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it
When executing docker run
, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306
as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.
Note: Do not use the data directory that your current MySQL 5.5 is
using (/var/lib/mysql by default)
Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.
You can also Try the way Rinzwind suggested, that's a good way to run it as well.
Hope this helps.
Running MySQL on docker would be a safe way to achieve what you want to do, it's not going to do anything to your existing MySQL instance.
You can run MySQL 8.0 on a different port in a Docker instance.
Here's how you can do it
When executing docker run
, you can pass this on to the command to remap the 3306 port inside the container to 3307 so that your application can connect to MySQL 8.0 instance.docker run --name=mysql1 -d mysql/mysql-server:tag -p 3307:3306
as referenced here
You can also choose to run the MySQL 8.0 from a local data directory and local my.cnf file created by you if you want to optimize the mysql installation, see here.
Note: Do not use the data directory that your current MySQL 5.5 is
using (/var/lib/mysql by default)
Create a new directory for MySQL 8.0 data directory and new my.cnf file instead.
You can also Try the way Rinzwind suggested, that's a good way to run it as well.
Hope this helps.
answered May 2 at 14:07
Shahriar ShojibShahriar Shojib
662 bronze badges
662 bronze badges
add a comment
|
add a comment
|
So I'm asking you, do you think running docker is the best plan here?
No
And if not, do you have a better idea?
Use the generic idea of what is considered the method on doing this: basically you install mysql for every version you need in a different directory and since we are talking 3rd party installs I would opt for /opt/
as that is the intended target for those kind of installs.
For mysql that would be
/opt/mysql-5.5
/opt/mysql-5.5.1
/opt/mysql-5.6
/opt/mysql-8.0
You create all the configuration inside those directories (so the my.cnf
inside those directories so you have 1 per install; if you want to run them all at the same time you need a socket and a port per mysql instance).
With a symlink to the binary in the version directories to /opt/mysql
you can also switch between the different versions.
The way to do this is more complex though. See for instance the percona site where they use /opt/
for manual install or openark.org where they use /usr/local/
(I like that method too though it does not use /opt
).
add a comment
|
So I'm asking you, do you think running docker is the best plan here?
No
And if not, do you have a better idea?
Use the generic idea of what is considered the method on doing this: basically you install mysql for every version you need in a different directory and since we are talking 3rd party installs I would opt for /opt/
as that is the intended target for those kind of installs.
For mysql that would be
/opt/mysql-5.5
/opt/mysql-5.5.1
/opt/mysql-5.6
/opt/mysql-8.0
You create all the configuration inside those directories (so the my.cnf
inside those directories so you have 1 per install; if you want to run them all at the same time you need a socket and a port per mysql instance).
With a symlink to the binary in the version directories to /opt/mysql
you can also switch between the different versions.
The way to do this is more complex though. See for instance the percona site where they use /opt/
for manual install or openark.org where they use /usr/local/
(I like that method too though it does not use /opt
).
add a comment
|
So I'm asking you, do you think running docker is the best plan here?
No
And if not, do you have a better idea?
Use the generic idea of what is considered the method on doing this: basically you install mysql for every version you need in a different directory and since we are talking 3rd party installs I would opt for /opt/
as that is the intended target for those kind of installs.
For mysql that would be
/opt/mysql-5.5
/opt/mysql-5.5.1
/opt/mysql-5.6
/opt/mysql-8.0
You create all the configuration inside those directories (so the my.cnf
inside those directories so you have 1 per install; if you want to run them all at the same time you need a socket and a port per mysql instance).
With a symlink to the binary in the version directories to /opt/mysql
you can also switch between the different versions.
The way to do this is more complex though. See for instance the percona site where they use /opt/
for manual install or openark.org where they use /usr/local/
(I like that method too though it does not use /opt
).
So I'm asking you, do you think running docker is the best plan here?
No
And if not, do you have a better idea?
Use the generic idea of what is considered the method on doing this: basically you install mysql for every version you need in a different directory and since we are talking 3rd party installs I would opt for /opt/
as that is the intended target for those kind of installs.
For mysql that would be
/opt/mysql-5.5
/opt/mysql-5.5.1
/opt/mysql-5.6
/opt/mysql-8.0
You create all the configuration inside those directories (so the my.cnf
inside those directories so you have 1 per install; if you want to run them all at the same time you need a socket and a port per mysql instance).
With a symlink to the binary in the version directories to /opt/mysql
you can also switch between the different versions.
The way to do this is more complex though. See for instance the percona site where they use /opt/
for manual install or openark.org where they use /usr/local/
(I like that method too though it does not use /opt
).
answered May 2 at 13:49
RinzwindRinzwind
223k29 gold badges431 silver badges574 bronze badges
223k29 gold badges431 silver badges574 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1139969%2fmultiple-sql-versions-with-docker%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown