Docker app installer

install_mysql57_base_docker.sh

A helper.sh-hosted script that creates the /data/mysql5.7 layout, writes a baseline MySQL 5.7 config, pulls mysql:5.7.44, and runs a restartable container with mounted data, config, and init directories.

ワンライナー

curl -fsSL helper.sh/install_mysql57_base_docker.sh | sudo bash
wget -qO- helper.sh/install_mysql57_base_docker.sh | sudo bash

実行条件

  • Linux host
  • Docker installed and running
  • root privileges or sudo
  • Port 3306 available
  • /data writable on the host

適用場面

  • Bring up a MySQL 5.7 instance quickly on a Docker-ready host
  • Keep MySQL data, config, and init SQL scripts under /data/mysql5.7 on the host
  • Standardize a reviewed bootstrap path for legacy applications that still depend on MySQL 5.7

主なポイント

  • Creates /data/mysql5.7/data, conf.d, and init automatically
  • Pulls mysql:5.7.44 and starts a restartable MySQL 5.7 container
  • Generates a strong root password automatically if you do not provide one
  • Supports optional initial database, user, and password creation on first boot

推奨手順

  1. Confirm Docker is already installed and the host can expose port 3306.
  2. Run the helper.sh command with sudo or as root.
  3. Let the script prepare /data/mysql5.7, pull mysql:5.7.44, and create the container.
  4. Record the printed root password and optional user credentials before handing the database to an application team.

注意事項

  • Do not expose MySQL 5.7 directly to the public internet without network controls.
  • Record the generated root password immediately if you did not provide one.
  • Back up /data/mysql5.7 before replacing or recreating a production container.

関連記事

Deploy MySQL 5.7 in Docker with /data/mysql5.7 as the host mount

A practical guide to using install_mysql57_base_docker.sh when Docker is already ready and you need a predictable MySQL 5.7 instance with host-mounted data, config, and init SQL.

関連トピック

Ubuntu 24.04 deployment basics

Install Docker, bootstrap common runtime services, and keep fresh Ubuntu 24.04 hosts ready for application rollout.

トピックを見る

Docker base services for application hosts

Use helper.sh scripts to standardize containerized Nginx, MySQL, Redis, PHP, and Workerman services on long-lived hosts.

トピックを見る

問題ページ

How to install MySQL 5.7 with Docker

Run an older MySQL 5.7 version with predictable mounted directories and generated credentials on a modern Docker host.

ページを見る