0

I'm trying connect to mysql-server docker container from my host with mysqlshell(mysqlsh) client and native mysql installer yum on fedora but in mysqlsh and in native mysql installer client i have same error message:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

But when i connect to docker container mysql-server with bash i can to connect to mysql with no problem and execute SQL's commands etc

i ran the following docker command sudo docker run --name=mysql-teste -p 3606:3606 -d mysql/mysql-server

My O.S: Fedora 30 Docker version 1.13.1, build 1185cfd/1.13.1

I don't have mysql-server installed on my host i only want connect from my host to mysql-server docker container.

Someone has a same problem?

1 Answers1

0

Make sure you have mysql server installed and running, then it should work ok see: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Cat22
  • 41
  • 4