Get following error, when trying to run MySQL in docker. Saying the ports is already in use, that would be for my local mysql database perhaps, how do I use docker and mysql
docker: Error response from daemon: driver failed programming external connectivity on endpoint stupefied_einstein (): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use.
解决方案
Map you docker mysql container on another port when you start the container:
docker run -p 3307:3306 ...
The container port 3306 will be mapped on the host port 3307. (while your real mysql can use 3306)