Jump to content

Question about Docker and MySQL

Friends,

This is the 1st time I am setting up a dedicated server at my home using RPi 4 (with Static IP).
I am also installing Docker to host and manage few sites and WordPress installations.
(mostly my previous works as demo which are no longer available in live sites)

I have a little doubt regarding Docker and MySQL, how to setup?
I do not want that every container uses its own MySQL instance which will take up too much memory and space of my RPi 4.
I want to run single common MySQL instance.
 

  • Option 1: Run MySQL as a dedicated Docker Container?
    But, I might need MySQL access from outside Docker, like some Linux scripts, some database mirroring etc.
     
  • Option 2: Install and run MySQL as local (traditional Linux installation)
    Will it be easy to access this MySQL by the Docker Containers?


Pls suggest.

PC enthusiast since MS DOS 5!

Link to comment
Share on other sites

Link to post
Share on other sites

Option 1 would be my choice, then you can create a virtual network in your docker compose files (assuming you are using an existing images) and connect your containers together. I would prefer everything have their mysql server though.

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×