docker start mysql custom profiles

Command line is as follows:

docker run --name mysql56 -p 3306:3306 -v /home/mysql56/data:/var/lib/mysql -v /home/mysql56/conf:/etc/mysql/ -e MYSQL_ROOT_PASSWORD=1qa2ws -d mysql:5.6.21

Description: 

-v / home / mysql56 / conf: / etc / mysql specify the local directory / home / mysql56 / conf docker mapped to mirror the / etc / mysql, so that you can create the configuration file my.cnf in / home / mysql56 / conf directory and make it work.

-v / home / mysql56 / data: / var / lib / mysql the mirror database path mapped to the local / home / mysql56 / data

Guess you like

Origin www.cnblogs.com/equation/p/12084385.html