Last active
July 2, 2020 09:30
-
-
Save ulisesantana/3ae30917fec072f140e3a8f9755cd31c to your computer and use it in GitHub Desktop.
Create a MySQL docker instance for develop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export MYSQL_ROOT_PASSWORD=root MYSQL_ROOT_HOST=% | |
sudo mkdir -p /data/mysql | |
sudo chmod -R 775 /data | |
docker run --name=mysql -d \ | |
-e MYSQL_ROOT_PASSWORD \ | |
-e MYSQL_ROOT_HOST \ | |
-p 3306:3306 \ | |
--restart unless-stopped \ | |
-v /data/mysql:/var/lib/mysql \ | |
mysql/mysql-server:5.7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment