• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Shell
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MySQL and MariaDB docker containers of MySQL v5.5, v5.6, v5.7, v8.0, mariadb v10.0, v10.1, v10.2, v10.3

Create all mysql-server docker container.

Motivation

In order to make it easy to test whether applications can be started with different versions, such as upgrading mysql, we made it possible to start multiple mysql servers easily.

mysqlのアップグレードなど、異なるバージョンでアプリケーションを起動できるかどうかをテストしやすくするために、複数のmysqlサーバーを docker-compose で簡単に起動できるようにしました。

Support MySQL version.

  • MySQL v5.5
  • MySQL v5.6
  • MySQL v5.7
  • MySQL v8.0
  • mariadb v10.0
  • mariadb v10.1
  • mariadb v10.2
  • mariadb v10.3

Usage

Install docker desktop

https://www.docker.com/products/docker-desktop

Install mysql-client

No need to install mysql client .

When connect-xxx.sh execute, the mysql client installed in the docker container is executed locally .

MySQLクライアントのインストールは不要です。

connect-xxx.shを実行すると、ローカルからMySQLコンテナ内のmysqlクライアントをリモート実行します。

Clone this repository

git clone [email protected]:treetips/docker-compose-all-mysql.git

Start mysql docker containers

$ docker-compose up -d

Connect any mysql-server on docker container

Connect remote mysql servers.

$ ./connect-mysql-5-5.sh
$ ./connect-mysql-5-6.sh
$ ./connect-mysql-5-6.sh
$ ./connect-mysql-8-0.sh
$ ./connect-mariadb-10-0.sh
$ ./connect-mariadb-10-1.sh
$ ./connect-mariadb-10-2.sh
$ ./connect-mariadb-10-3.sh

Wait for MySQL started before connecting.

MySQLの起動完了を待ってから接続します。。

waiting for running

Optional

Customize mysql client settings

vi ./my.cnf

All the same connection setting except port.

ポート以外の設定を共通で設定します。

Customize mysql server settings

$ vi ./mysql5.5/conf.d/my.cnf
$ vi ./mysql5.6/conf.d/my.cnf
$ vi ./mysql5.7/conf.d/my.cnf
$ vi ./mysql8.0/conf.d/my.cnf
$ vi ./mariadb10.0/conf.d/my.cnf
$ vi ./mariadb10.1/conf.d/my.cnf
$ vi ./mariadb10.2/conf.d/my.cnf
$ vi ./mariadb10.3/conf.d/my.cnf

Customize default schema, user, password

If you change database-schema or user or password or root-password, Edit .env .

DBスキーマ・ユーザ名・パスワード・rootパスワードを変更したい場合は、 .env を編集して下さい。

DB_DATABASE=work
DB_USER=worker
DB_PASSWORD=worker
DB_ROOT_PASSWORD=root

Remove logs

If you want to delete general.log and error.log and slow-query.log, execute clear_logs.sh .

general.logerror.log を削除したい場合は clear_logs.sh を実行して下さい。

Customize init scripts

https://hub.docker.com/_/mysql/#initializing-a-fresh-instance

Execution order at startup

  1. ./common/initdb.d/common-init.(sh|sql) (executed commonly for all containers)
  2. ./(mysql|mariadb)X.X/initdb.d/xxx.(sh|sql) (executed for each container)

Initial data can be input at startup by customizing these.

これらをカスタマイズすることにより、起動時に初期データを投入できます。

More Repositories

1

typescript-nextjs-redux-material-ui-example

next.js v9, typescript v3.7, redux, material-ui v4, react-hooks, redux-saga, SSR
TypeScript
119
star
2

typescript-nextjs-redux-toolkit-material-ui-example

TypeScript v3.8, Next.js v9, Redux Toolkit, Material-UI v4, react-hooks, SSR live demo
TypeScript
81
star
3

nextjs-typescript-scss-example

Example of a React+Next.js+Typescript+CSS Modules application.
TypeScript
14
star
4

selenium-grid-nightwatch-example

Docker上のSeleniumGridを使ってNightwatchでE2Eテストをするサンプルです
JavaScript
8
star
5

nextjs-geistui-swr-example

nextjs-geistui-swr-example
TypeScript
6
star
6

ts-react-vite-tauri-camera-example

ts-react-vite-tauri-camera-example
TypeScript
5
star
7

simple-static-file-viewer

Lightweight simple static file viewer
CSS
5
star
8

angular-material-sidenav-example

angular-material auto toggle sidenav example
TypeScript
3
star
9

angular-material-appbar-sidenav-ngrx-example

angular-material auto toggle sidenav with @ngrx/store example
TypeScript
3
star
10

nx-nestjs-angular-example

Monorepo sample in Nx + Nest.js + Angular
TypeScript
2
star
11

ansible-playbook-git

install latest git
2
star
12

kotlin-spring-boot-jooq-liquibase-thymeleaf-example

Mono repository for Spring boot2(reactive-api, reactive-admin, batch)
Java
2
star
13

ansible-playbook-imagemagick

This ansible playbook for install ImageMagic and autoconf
Shell
2
star
14

schemaspy-mysql

Database table definition by SchemaSpy and you can browse that on docker.
2
star
15

kotlin-ktor-appengine-example

kotlin-ktor-appengine-example
Kotlin
1
star
16

ansible-playbook-lllang-envs

install rbenv, pyenv, plenv, phpenv
Shell
1
star
17

ts-react-vite-vitest-remote-development-template

Node.js remote development template for VSCode.
TypeScript
1
star
18

waifu2x-gui

waifu2x-gui
TypeScript
1
star
19

ansible-playbook-mysql-client-server

mysql-client nad mysql-server playbook for ansible.
Ruby
1
star
20

kotlin-quarkus-multiproject-example

kotlin-quarkus-multiproject-example
Kotlin
1
star
21

spring-boot-flyway-jooq-example

Spring boot + Spring Batch + Flyway + Jooq generator + Jooqのサンプルプロジェクトです。
Java
1
star
22

dockerfile-centos-hubot-slack

This dockerfile is intended to make it easy to develop hubot scripts for slack.
1
star