SpringBoot Docker Mysql installation, Docker installation Mysql
================================
©Copyright Sweet Potato Yao April 2, 2018
http://fanshuyao.iteye.com/
1. Create a Mysql container
docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.5
The result is as follows:
[root@localhost ~]# docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.5 a9c2f22a4b508d5e300b91721d03587b11fc20521e64295040d47165db66873d
-p 3306:3306: Indicates that the port 3306 of the docker container is mapped to the port 3306 of mysql
-e MYSQL_ROOT_PASSWORD=root : indicates that the specified password is root
To set mysql, you must specify a password, that is, set the parameter MYSQL_ROOT_PASSWORD
The following command increases the mysql encoding setting:
docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.5 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
For more commands see:
https://hub.docker.com/r/_/mysql/
==============================================
Getting started with SpringBoot Docker, see SpringBoot Docker installation:
http://fanshuyao.iteye.com/blog/2415306
================================
©Copyright Sweet Potato Yao April 2, 2018
http://fanshuyao.iteye.com/