2.23. Docker install MySQL

发布时间 : 2025-10-25 13:32:37 UTC      

Page Views: 9 views

MySQL is the most popular open source database in the world. With its reliability, ease of use, and performance, MySQL has become the database of choice for Web applications.

2.23.1. 1. View the available MySQL versions

Access MySQL Mirror Library address: https://hub.docker.com/_/mysql?tab=tags .

You can view other versions of MySQL through Sort by. The default is the latest version. mysql:latest .

` <../wp-content/uploads/2016/06/docker-mysql1.png>` __

You can also find other versions you want in the drop-down list: ` <../wp-content/uploads/2016/06/docker-mysql2.png>`__

In addition, we can use the docker search mysql command to view the available versions:

$ docker search mysql NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql MySQL is a widely used, open-source relati... 2529 [OK] mysql/mysql-server Optimized MySQL Server Docker images. Crea... 161 [OK] centurylink/mysql Image containing mysql. Optimized to be li... 45 [OK] sameersbn/mysql 36 [OK] google/mysql MySQL server for Google Compute Engine 16 [OK] appcontainers/mysql Centos/Debian Based Customizable MySQL Con... 8 [OK] marvambass/mysql MySQL Server based on Ubuntu 14.04 6 [OK] drupaldocker/mysql MySQL for Drupal 2 [OK] azukiapp/mysql Docker image to run MySQL by Azuki - http:... 2 [OK] ... 

2.23.2. 2. Pull MySQL image

Here we pull the official image of the latest version:

$ docker pull mysql:latest 

` <../wp-content/uploads/2016/06/docker-mysql3.png>` __

2.23.3. 3. View the local image

Use the following command to see if mysql is installed:

$ docker images 

` <../wp-content/uploads/2016/06/docker-mysql6.png>` __

You can see in the figure above that we have installed the latest version (latest) of the mysql image.

2.23.4. 4. Run the container

After the installation is complete, we can run the mysql container using the following command:

$ docker run -itd --name mysql-test -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql 

Parameter description:

  • -p 3306:3306 Map port 3306 of CCS to port 3306 of CDH. External hosts can access MySQL services directly through CDH ip:3306.

  • MYSQL_ROOT_PASSWORD=123456 Set the password for the MySQL service root user

` <../wp-content/uploads/2016/06/docker-mysql4.png>` __

2.23.5. 5. Installation succeeded

Use the docker ps command to see if the installation is successful:

` <../wp-content/uploads/2016/06/docker-mysql5.png>` __

The MySQL service can be accessed locally through root and password 123456.

` <../wp-content/uploads/2016/06/docker-mysql7.png>` __

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。