1 needs
- Provide mysql service locally through docker (no need to install mysql)
2 orders
- docker command
docker run -dp 3306:3306 ` -v mysql-data:/var/lib/mysql ` -e MYSQL_ROOT_PASSWORD=root ` -e MYSQL_DATABASE=user_info ` mysql:5.7
Note: When starting docker, set the port, otherwise it cannot be accessed locally
When the command is executed for the first time, it appears: unable to find image 'mysql:5.7'
Waiting for the image to be downloaded