При запуске контейнера docker mysql выдал ошибку Channel mysql_main configured to support TLS

У меня есть проект на spring, который я хочу обернуть в докер. Я использую базу данных MySQL. Собрал проект в изображение

docker build -t apex-back . И попробовал запустить docker compose up

После чего возникла ошибка:

2024-07-21 13:29:15 2024-07-21T10:29:15.006459Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-07-21 13:29:15 2024-07-21T10:29:15.288455Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.0.0) starting as process 1
2024-07-21 13:29:15 2024-07-21T10:29:15.299116Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-07-21 13:29:15 2024-07-21T10:29:15.496227Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-21 13:29:15 2024-07-21T10:29:15.754519Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-07-21 13:29:15 2024-07-21T10:29:15.754592Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-07-21 13:29:15 2024-07-21T10:29:15.789702Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2024-07-21 13:29:15 2024-07-21T10:29:15.790925Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '9.0.0'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2024-07-21 13:29:14 2024-07-21 10:29:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.0-1.el9 started.
2024-07-21 13:29:14 2024-07-21 10:29:14+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-07-21 13:29:14 2024-07-21 10:29:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.0-1.el9 started.
2024-07-21 13:29:14 '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-07-21 13:33:30 2024-07-21T10:33:30.938030Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 9.0.0).
2024-07-21 13:33:31 2024-07-21T10:33:31.916670Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 9.0.0)  MySQL Community Server - GPL.
2024-07-21 13:33:31 2024-07-21T10:33:31.916715Z 0 [System] [MY-015016] [Server] MySQL Server - end.

Phpmyadmin так же выдал ошибку при попытке авторизации: введите сюда описание изображения

Код docker-compose.yml:

version: "3.8"

services:
  back:
    image: apex-back
    container_name: Apex_Back
    restart: always

    build:
      context: .
      dockerfile: Dockerfile

    networks:
      - apex-network

    depends_on:
      - mysql

    ports:
      - "8000:8000"

  bot:
    image: apex_bot
    restart: always
    container_name: apex-bot

    build:
      context: .
      dockerfile: ./Dockerfile


    networks:
      - apex-network

    command: "python main.py"

  mysql:
    image: mysql:latest
    container_name: mysql
    restart: always

    ports:
      - "3306:3306"

    volumes:
      - /path/to/data:/var/lib/mysql

    expose:
      - "3306"

    networks:
      - apex-network

    command: --pid-file /var/lib/mysql/mysqld.pid

    environment:
      - MYSQL_USER = root
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=apex_db
      - MYSQL_ROOT_HOST = localhost

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    restart: always

    ports:
      - "8080:80"

    environment:
      PMA_HOST: db
      MYSQL_ROOT_PASSWORD:

    networks:
      - apex-network

networks:
  apex-network:
    name: apex-network

Ответы (0 шт):