Error starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use

前端 未结 9 688
难免孤独
难免孤独 2020-12-09 08:16

I have to make LAravel app and to deliver a Dockerfile ,but I\'m really stuck with this. Before that I had a nightmare wile installing laravel on m

相关标签:
9条回答
  • 2020-12-09 09:05

    I had the same problem and

    sudo netstat -nlpt |grep 3306
    

    showed me the PID and which service it was started by (mysgld). Whenever I tried to kill the PID then it was started again. But the problem was fixed when I stopped the service by

    sudo service mysql stop
    

    Notice that you will have to use mysql and not mysqld.

    I hope that this will do it for you - I was able to run docker-compose up without any problems

    0 讨论(0)
  • 2020-12-09 09:10

    On Ubuntu, running this command will stop your mysql from running for your docker container to work:

    sudo service mysql stop  
    

    Then, if your apache2 is running, you need to stop the service especially when you want to work with nginx:

    sudo service apache2 stop
    

    Then, you can run your docker-compose up -d ... command

    0 讨论(0)
  • 2020-12-09 09:11

    Try to kill all the processes using the port 3306:

    sudo kill `sudo lsof -t -i:3306`
    

    Then, run your docker containers:

    sudo docker-compose up
    
    0 讨论(0)
提交回复
热议问题