Skip to content

Instantly share code, notes, and snippets.

@ulisesantana
Last active July 2, 2020 09:30
Show Gist options
  • Save ulisesantana/3ae30917fec072f140e3a8f9755cd31c to your computer and use it in GitHub Desktop.
Save ulisesantana/3ae30917fec072f140e3a8f9755cd31c to your computer and use it in GitHub Desktop.
Create a MySQL docker instance for develop
#!/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