Running MySQL 5.7 in Docker

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
bschmalhofer
Znuny newbie
Posts: 12
Joined: 30 Apr 2020, 15:16
Znuny Version: 6.0
Real Name: Bernhard Schmalhofer
Company: Bernhard Schmalhofer
Location: Munich
Contact:

Running MySQL 5.7 in Docker

Post by bschmalhofer »

Hi,
I wanted to install ((OTRS)) Community Edition on Ubunti 20.04. A problem was that Ubuntu 20.04 ships with MySQL 8 as the default MySQL version. But MySQL 8 is not supported.

Therefore the idea was to spin up a MySQL instance in Docker. Affter some fiddling this seems to work:

Code: Select all

docker run --name otrs-mysql -e MYSQL_ROOT_PASSWORD=XXXXXX -p 3306:3306 -d mysql:5.7.30 --max-allowed-packet=67108864 --innodb-log-file-size=268435456 --character-set-server=utf8 --collation-server=utf8_general_ci
Some things are worth noting.

The port 3306 in the countainer is mapped to 3306 on the host. I could not map to another port as installer.pl expects the default port. The downside is that I had to shut down the already running MySQL server on the host.

Explicitly passing the mysqld parameters as CMD eliminated the need to adapt the mysql configuration on the host.

The image from DockerHub has a VOLUME declaration for /var/lib/mysql. Therefore an explicit specification is not needed.

When running installer.pl one can keep 127.0.0.1 as the host.
jbaptiste
Znuny advanced
Posts: 104
Joined: 01 Aug 2015, 03:45
Znuny Version: 6.0.x
Contact:

Re: Running MySQL 5.7 in Docker

Post by jbaptiste »

Hi,

You can also run OTRS in docker:

https://github.com/juanluisbaptiste/docker-otrs/
Want to run OTRS on docker ? checkout my OTRS on docker HOWTO | Project's github page
Post Reply