MySQL是一款广泛应用于各类Web应用、企业级系统及数据存储场景的开源SQL数据库,它以快速的数据处理能力、稳定的运行性能和高效的多线程架构为核心优势,其长期版本的维护工作由Canonical负责,为用户提供持续的技术支持、安全更新及功能优化服务,是全球众多开发者和企业信赖的数据库解决方案。

74 次收藏下载次数: 0状态:社区镜像维护者:Ubuntu 官方镜像仓库类型:镜像最近更新:1 个月前
下载命令
点击查看

ubuntu/mysql is a rock for mysql maintained by https://canonical.com/.

MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and ease of use. Read more on the https://dev.mysql.com/doc/refman/8.0/en/.

\https://dev.mysql.com/doc/\]

Tags and Architectures

NOTE: These tags follow a specific naming convention that respects the concept of channels.

TagsSupported untilVersionBaseArchitectures
8.4-26.04_stable
aliases8.4-26.04, 8.4-26.04_beta, 8.4-26.04_candidate, 8.4-26.04_edge
10/20318.426.04arm64, s390x, amd64
8.4-24.04_beta
aliases8.4-24.04_beta
04/20318.424.04amd64, s390x, arm64
8.0-24.04_beta
aliases8.0-24.04_beta
07/20318.024.04s390x, amd64, arm64
8.0-22.04_beta
aliases8.0-22.04_edge
-8.022.04amd64, s390x, ppc64le, arm64
8.0-21.10_beta
aliases8.0-21.10_edge
-8.021.10s390x, amd64, arm64, ppc64le
8.0-21.04_beta
aliases8.0-21.04_edge
-8.021.04s390x, arm64, amd64, ppc64le
8.0-20.04_beta
aliases8.0-20.04_edge
-8.020.04s390x, arm64, amd64, ppc64le
8.4-24.04_edge
aliases8.4-24.04_edge
04/20318.424.04amd64, s390x, arm64
8.0-24.04_edge
aliases8.0-24.04_edge
07/20318.024.04s390x, amd64, arm64

Get started

This rock's entrypoint is Pebble, a container-optimized init process that enables the orchestration of a collection of local service processes as an organized set.

\https://documentation.ubuntu.com/pebble/\]

Inspect

To view the https://documentation.ubuntu.com/rockcraft/en/latest/reference/rockcraft-yaml/#services and https://documentation.ubuntu.com/rockcraft/latest/reference/rockcraft-yaml/#checks defined in this rock:

sh
docker run --rm ubuntu/mysql:8.4-26.04_stable plan

Run

To run this rock, use any of the usual container runtimes, for example, docker:

sh
docker run --name mysql-container \
    -e TZ=UTC -e MYSQL_ROOT_PASSWORD=My:S3cr3t -p 30306:3306 \
    ubuntu/mysql:8.4-26.04_stable

MySQL server runs on port 30306. Access the server at localhost:30306.

Get logs

To view the logs of the running container, run:

sh
docker exec mysql-container pebble logs

Or, for a specific service:

sh
docker exec mysql-container pebble logs <service>

Monitor health checks

Rocks may have predefined health checks that you can list by running:

sh
docker exec mysql-container pebble checks

The overall health of your container can be inspected via:

sh
docker exec mysql-container pebble health

Configuration

Environment variables

OptionDescriptionDefault
TZTimezone.UTC
MYSQL_ROOT_PASSWORDSet the password for the root user. This option is mandatory and must not be empty.None
MYSQL_PASSWORDSet the password for the MYSQL_USER user.None
MYSQL_USERCreate a new user with the MYSQL_PASSWORD password. The user is created with superuser privileges.None
MYSQL_DATABASESet the name of the default database.None
MYSQL_ALLOW_EMPTY_PASSWORDSet up a blank password for the root user. This is not recommended in production.None
MYSQL_RANDOM_ROOT_PASSWORDGenerate a random password for the root user. The password is printed in the logs.None
MYSQL_ONETIME_PASSWORDSet up a one-time password for the root user. A password change is required on first login.None
MYSQL_INITSB_SKIP_TZINFOTimezone data is automatically loaded via entrypoint script; set this variable to any non-empty value to disable it.None

Volumes

OptionDescriptionDefault
-v <path>:/var/lib/mysqlPersist data instead of initializing a new database every time you launch a new container.None
-v <path>:/etc/mysql/mysql.conf.d/Local configuration files for MySQL.None

Ports

OptionDescriptionDefault
-p <port>:3306Expose MySQL server on localhost:30306.None

\https://github.com/canonical/mysql-rock/issues\] \https://github.com/canonical/mysql-rock\]

Canonical is the provider of this container image. It is the user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within, as well as with https://canonical.com/legal/intellectual-property-policy.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 mysql 镜像标签

docker pull docker.xuanyuan.run/ubuntu/mysql:<标签>

DockerHub 原生拉取命令

docker pull ubuntu/mysql:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告