Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 连接报错
I deployed a TiDB cluster using Docker, but encountered an error when trying to connect. The error message is as follows:
Lost connection to MySQL server at ‘reading initial communication packet’
I’ve seen many people reporting this error in the community, but why haven’t I seen a specific solution?
Which version are you using?
Check if the MySQL client you are using is compatible with the TiDB version. Currently, TiDB uses the MySQL 5.7 client.
The image you provided is not visible. Please provide the text you need translated.
The Docker image pulled for TiDB is the latest version, right? I checked and it is V5.4.0. When deploying on Windows, several TiKV containers were not working and after a while, they kept showing as restarting. However, when deploying on Linux, it eventually worked, although it didn’t at first. It seems like the deployment process takes some time as everyone says. But on Windows, it never starts properly.
You need to check the Docker container’s startup logs to see what the error is. It’s highly likely a compatibility issue. It could be that the TiDB cluster service running on the Linux version of Docker is not compatible with the Windows system. Another possibility is that the Windows MySQL client is not compatible with the TiDB cluster. It is recommended to verify and confirm the issue separately.