title: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure (Docker, Spring Booot, Mac)
body: <p>Preconditions:</p>
  <ol>
  <li>I am using Mac OS system, Apple M1 chip;</li>
  <li>MySQL is installed using a docker image;</li>
  <li>I am not using the docker-compose.yaml file;</li>
  <li>My project is Spring Boot 2.x.</li>
  </ol>
  <p>Detail:<br />
  I can use MySQL Workbench to connect to the database through 127.0.0.1:3306, and the application can also connect to the database through 127.0.0.1:3306. However, after using docker to package the image, the application cannot connect to the database through 127.0.0.1:3306 after starting the application in the container.</p>