-
-
Save macoding777/053a8367a481a47690b1d05a5c6771fa to your computer and use it in GitHub Desktop.
Install mysql-docker and allow remote access.
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
https://hub.docker.com/r/mysql/mysql-server/ | |
---- | |
Install | |
> docker pull mysql | |
---- | |
Check Image | |
> docker image ls | |
--- | |
Run the Image | |
> docker run --name container-name -p 3306:3306 -h 0.0.0.0 -e MYSQL_ROOT_PASSWORD=satupassword -d mysql --max_connections=1000000 | |
--- | |
Check Container | |
> sudo docker ps -a (check active/inactive container) | |
> sudo docker ps (check active container) | |
-- | |
Enter Docker Container | |
> sudo docker exec -it <container_id/> mysql -u root -p | |
-- | |
Stop Docker Container | |
> sudo docker stop <container_id> | |
--- | |
Remove Docker Container | |
> sudo docker rm <container_id> | |
--- | |
Remove Docker Image | |
> sudo docker image rm <image_id/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment