Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker db container running. Another process with pid <id> is using unix socket file

I'm trying to run a docker mysql container with initialized db according instruction provided in this message https://stackoverflow.com/a/29150538/6086816. After first run it works ok, but on second run, after trying of executing /usr/sbin/mysqld from script, I get this error:

db_1 | 2016-03-19T14:50:14.819377Z 0 [ERROR] Another process with pid 10 is using unix socket file.

db_1 | 2016-03-19T14:50:14.819498Z 0 [ERROR] Unable to setup unix socket lock file.

...

mdir_db_1 exited with code 1

what can be the reason of it?

like image 646
Arnold Eden Avatar asked Sep 08 '25 12:09

Arnold Eden


2 Answers

I solved this issue by doing the following command:

docker-compose down --volumes

And then:

sail up --build

https://rawbinn.com/blog/mysql-not-starting-on-docker

like image 61
Rawbinn Shrestha Avatar answered Sep 11 '25 02:09

Rawbinn Shrestha


Thanks to halcyon comment:

If you use docker desktop. In menu → "Volumes" → click your volume name → select "data" tab. And here remove “mysql.sock.lock” Now mysql works.

like image 29
Ehsan Paknejad Avatar answered Sep 11 '25 00:09

Ehsan Paknejad