I have mounted the mysql socket into the container using:
-v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock
But I get this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (111)
I have mounted the mysql socket into the container using:
-v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock
But I get this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (111)
If you're trying to connect inside the container, you need to connect to /tmp/mysql.sock
though right...? (as that's where it's mounted to) You need to configure your client to connect to /tmp/mysql.sock
.
Check out this SO Answer for more info on that.