Skip to content

Instantly share code, notes, and snippets.

@alexanderjamesking
Created April 4, 2015 11:45
Show Gist options
  • Save alexanderjamesking/32a3d2dfbb1a3c11f440 to your computer and use it in GitHub Desktop.
Save alexanderjamesking/32a3d2dfbb1a3c11f440 to your computer and use it in GitHub Desktop.
MySQL docker container for local development
echo "Cleaning up existing mysql container"
echo "Stopping mysql container..."
docker stop mysql
echo "Removing mysql container..."
docker rm mysql
echo "Starting mysql container..."
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.6
echo "Started container, forwarded docker host port 3306 to container, connect using details: root:password"
echo "e.g. mysql -h192.168.59.103 -uroot -ppassword"
echo "where 192.168.59.103 is the IP of your docker host"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment