Mysql database non high availability in Openshift

Hello, I’m testing Openshift (I’m a newbie) and I was trying to deploy a MySQL database in Openshift, but I only want it to be a single instance that will be available when I need it. I don’t want to use the Openshift operator because it deploys replicasets in high availability mode, which requires too many resources.

I have tried to use image hosted on Docker Hub (percona/percona-server), but even though it allows me to log in to other databases, it does not allow me to log in to yours.
The error it throws is:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
(get similar error with percona/percona-server-mongodb)

Could someone lend me a hand, or is there a detailed guide that I can use to learn what mistakes I’m making?

I was trying to build a database on ubi8, but I wanted to test the image on Docker Hub to see if it would work on Openshift… (and it meets my needs).

Hello @kaedra,
You can use the Openshift operator and configure it to only launch 1 node which will therefore not deploy a replicaset.

The docker images work great. If you are having issues, that tells me you didn’t follow all the proper steps for creating the container as outlined in our docker documentation. Can you please provide all the steps/commands you executed for setting up the docker container?

Hi, I redeployed the Docker Hub image as a Deployment, and it worked this time. I couldn’t replicate the scenario. I checked that all the essential variables and the disks were mounted.

I will also try to use the Openshift operator and configure it to launch 1 node, to see if this type of deployment also works for me.