openeuler/mysqlThe official MySQL docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current MySQL docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
Learn more on MySQL website.
The tag of each mysql docker image is consist of the version of mysql and the version of basic image. The details are as follows
| Tags | Currently | Architectures |
|---|---|---|
| 9.5.0-oe2403sp2 | mysql 9.5.0 on openEuler 24.03-LTS-SP2 | amd64, arm64 |
| 8.3.0-oe2203sp3 | MySQL server 8.3.0 on openEuler 22.03-LTS-SP3 | amd64, arm64 |
| 9.1.0-oe2203sp1 | MySQL server 9.1.0 on openEuler 22.03-LTS-SP1 | amd64, arm64 |
| 9.1.0-oe2203sp3 | MySQL server 9.1.0 on openEuler 22.03-LTS-SP3 | amd64, arm64 |
| 9.1.0-oe2203sp4 | MySQL server 9.1.0 on openEuler 22.03-LTS-SP4 | amd64, arm64 |
| 9.1.0-oe2403lts | MySQL server 9.1.0 on openEuler 24.03-LTS | amd64, arm64 |
In this usage, users can select the corresponding {Tag} and container startup options based on their requirements.
Pull the openeuler/mysql image from docker
bashdocker pull openeuler/mysql:{Tag}
Start a mysql instance
bashdocker run -d --name my-mysql -p 30306:3306 -e MYSQL_ROOT_PASSWORD=openEuler:S3cr3t/ openeuler/mysql:{Tag}
After the instance my-mysql is started, access the mysql service through http://localhost:30306.
Container startup options
| Option | Description |
|---|---|
-p 30306:3306 | Expose MySQL server on localhost:30306. |
-e MYSQL_ROOT_PASSWORD | Set the password for the root user. This option is mandatory and must not be empty. |
-e MYSQL_USER | Create a new user with superuser privileges. This is used in conjunction with MYSQL_PASSWORD. |
-e MYSQL_DATABASE | Set the name of the default database. |
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes | Set up a blank password for the root user. This is not recommended to be used in production, make sure you know what you are doing. |
-e MYSQL_RANDOM_ROOT_PASSWORD=yes | Generate a random initial password for the root user using pwgen. It will be printed in the logs, search for GENERATED ROOT PASSWORD. |
-e MYSQL_ONETIME_PASSWORD=yes | Set root user as experide once initialization is complete, forcing a password change on first login. |
-v /path/to/data:/usr/local/mysql/data/ | Persist data instead of initializing a new database every time you launch a new container. |
-v /path/to/config/files/:/usr/local/mysql/mysql.conf.d/ | Local configuration files. |
View container running logs
bashdocker logs -f my-mysql
To get an interactive shell
bashdocker exec -it my-mysql/bin/bash
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务