Home >Database >Mysql Tutorial >How Docker creates MySQL
1. Download mysql image
Command: docker pull mysql
2 .Create container
Command sample:
sudo docker run -p 3306:3306 --name mysql -v $pwd/conf:/etc/mysql/conf.d -v $pwd/logs:/logs -v $pwd/data:/var/lib/mysql -e mysql_root_password=root -d mysql
Command description:
The above is the detailed content of How Docker creates MySQL. For more information, please follow other related articles on the PHP Chinese website!