Connection Error

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 连接报错

| username: 我在路上

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?

| username: HACK | Original post link

Which version are you using?

| username: xiaohetao | Original post link

Check if the MySQL client you are using is compatible with the TiDB version. Currently, TiDB uses the MySQL 5.7 client.

| username: xiaohetao | Original post link

| username: xiaohetao | Original post link

The image you provided is not visible. Please provide the text you need translated.

| username: 我在路上 | Original post link

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.

| username: Lucien-卢西恩 | Original post link

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.