Navicat connection mysql error in docker lamp container, error code 2003

I ran a container using mattrayner/lamp in docker hub, exposing ports 3306 and 8081 for external use. When using navicat to try to connect to mysql Times error: 2003-cant"t connect to mysql server on ip (10061 "unknown error")

dockerfiledocker-compose.yml


up

:
dockerping ip ping telnet ip 3306

select host,user from mysql.user;:

how can I connect with navicat? Thank you, prawns.

Is

mapping native? 127.0.0.1?


did you use your local navicat to connect to the mysql in Aliyun docker?
mysql does not allow remote connections by default. You need to open remote connections in mysql.


docker has not been used, but it should be about the same as VM. Let's take a look at whether the mysql service is started. My telnet 139.199.17.176 3306 cannot be accessed. Normally, the firewall is enabled and port 3306 is not open.
in addition, it is recommended to perform select host,user from mysql.user; post to see


MySQL5.7 version can not be connected with Navicat for MySQL, to change to Navicat Premium or Workbench client

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bead62-46a70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bead62-46a70.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?