獲取鏡像```docker pull mariadb```掛載```docker volume create data_mariadb``````docker run --name mariadb -v data_mariadb:/var/lib/mysql \-p 3306:3306 -e MYS... ...
獲取鏡像
docker pull mariadb
掛載
docker volume create data_mariadb
docker run --name mariadb -v data_mariadb:/var/lib/mysql \
-p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mariadbnnnnnnnnnnnnnnnnnnnnnnnnn
允許遠程連接
```java
docker run -it --link mariadb:mysql
--rm mariadb sh -c 'exec mysql
-h"\(MYSQL_PORT_3306_TCP_ADDR" \
-P"\)MYSQL_PORT_3306_TCP_PORT"
-uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD