Sign inSign up

openeuler/mysql

Sponsored OSS

By openeuler

•Updated 3 months ago

Image
0

10K+

openeuler/mysql repository overview

⁠Quick reference

⁠MySQL | 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

TagsCurrentlyArchitectures
9.7.0-oe2403sp4⁠mysql 9.7.0 on openEuler 24.03-LTS-SP4amd64, arm64
9.7.0-oe2403sp3⁠mysql 9.7.0 on openEuler 24.03-LTS-SP3amd64, arm64
9.5.0-oe2403sp2⁠mysql 9.5.0 on openEuler 24.03-LTS-SP2amd64, arm64
8.3.0-oe2203sp3⁠MySQL server 8.3.0 on openEuler 22.03-LTS-SP3amd64, arm64
9.1.0-oe2203sp1⁠MySQL server 9.1.0 on openEuler 22.03-LTS-SP1amd64, arm64
9.1.0-oe2203sp3⁠MySQL server 9.1.0 on openEuler 22.03-LTS-SP3amd64, arm64
9.1.0-oe2203sp4⁠MySQL server 9.1.0 on openEuler 22.03-LTS-SP4amd64, arm64
9.1.0-oe2403lts⁠MySQL server 9.1.0 on openEuler 24.03-LTSamd64, arm64

⁠Usage

In this usage, users can select the corresponding {Tag} and container startup options based on their requirements.

  • Pull the openeuler/mysql image from docker

    docker pull openeuler/mysql:{Tag}
    
  • Start a mysql instance

    docker 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

    OptionDescription
    -p 30306:3306Expose MySQL server on localhost:30306.
    -e MYSQL_ROOT_PASSWORDSet the password for the root user. This option is mandatory and must not be empty.
    -e MYSQL_USERCreate a new user with superuser privileges. This is used in conjunction with MYSQL_PASSWORD.
    -e MYSQL_DATABASESet the name of the default database.
    -e MYSQL_ALLOW_EMPTY_PASSWORD=yesSet 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=yesGenerate 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=yesSet 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

    docker logs -f my-mysql
    
  • To get an interactive shell

    docker exec -it my-mysql/bin/bash
    

⁠Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images⁠.

Tag summary

Content type

Image

Digest

sha256:520e8bc3d…

Size

1.1 GB

Last updated

3 months ago

docker pull openeuler/mysql

This week's pulls

Pulls:

33

Last week