How to start MySQL server in Docker
Running MySQL in a Docker container offers numerous advantages. It eliminates the need to install MySQL directly on your machine, ensuring a clean and isolated environment. This approach allows you to quickly start and stop the database, try different versions without impacting your system, and maintain a consistent configuration across development and production. Additionally, Docker makes it easier to manage dependencies, share configurations, and replicate setups for team collaboration.
Starting MySql on docker
Check logs
Note. Password is "change-me"
Connect to DB from within docker container(no need to have mysql client installed)
Connect to DB from local (if mysql command line client is installed)
See also: