Задать вопрос
@Qwyu_4iLofK

Почему не компилируются данные из бд в локальную папку?

version: '3'
services:
  db:
    image: mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: 123456
    volumes:
     - ".data:/var/lib/mysql"
    ports:
     - 8083:3306

  adminer:
      image: adminer
      restart: always
      ports:
        - 8880:8080


Раньше все работало. и данные из бд попадали в папку .data/

стала смотреть логи
docker logs --tail 50 --follow --timestamps a39907cdc

Логи
2020-12-05T13:55:03.466510129Z 2020-12-05 13:55:03+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2020-12-05T13:55:03.760878860Z 2020-12-05T13:55:03.749160Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 1
2020-12-05T13:55:03.762287636Z 2020-12-05T13:55:03.762233Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-12-05T13:55:04.475238232Z 2020-12-05T13:55:04.474526Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-12-05T13:55:04.574659745Z mysqld: Table 'mysql.plugin' doesn't exist
2020-12-05T13:55:04.574778622Z 2020-12-05T13:55:04.574625Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2020-12-05T13:55:04.577567377Z 2020-12-05T13:55:04.577409Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-12-05T13:55:04.598900806Z 2020-12-05T13:55:04.598696Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-12-05T13:55:04.599894820Z 2020-12-05T13:55:04.599573Z 0 [Warning] [MY-000054] [Server] World-writable config file './auto.cnf' is ignored.
2020-12-05T13:55:04.600506700Z 2020-12-05T13:55:04.600301Z 0 [Warning] [MY-010107] [Server] World-writable config file './auto.cnf' has been removed.
2020-12-05T13:55:04.600866565Z 2020-12-05T13:55:04.600668Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 79fc52d8-3701-11eb-8261-0242ac150003.
2020-12-05T13:55:04.612017316Z 2020-12-05T13:55:04.611807Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-12-05T13:55:04.613872035Z 2020-12-05T13:55:04.613671Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2020-12-05T13:55:04.614012327Z 2020-12-05T13:55:04.613824Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-12-05T13:55:04.614677398Z 2020-12-05T13:55:04.614432Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-12-05T13:55:04.614912708Z 2020-12-05T13:55:04.614671Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-12-05T13:55:04.617215162Z 2020-12-05T13:55:04.616942Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-12-05T13:55:04.617597542Z 2020-12-05T13:55:04.617307Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2020-12-05T13:55:04.617913564Z 2020-12-05T13:55:04.617641Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2020-12-05T13:55:04.618049769Z 2020-12-05T13:55:04.617842Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2020-12-05T13:55:04.618712463Z 2020-12-05T13:55:04.618423Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-12-05T13:55:04.618928777Z 2020-12-05T13:55:04.618654Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-12-05T13:55:04.619154155Z 2020-12-05T13:55:04.619092Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-12-05T13:55:06.172632038Z 2020-12-05T13:55:06.172242Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.
2020-12-05T13:55:32.297887338Z 2020-12-05 13:55:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2020-12-05T13:55:32.381501401Z 2020-12-05 13:55:32+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-12-05T13:55:32.385597005Z 2020-12-05 13:55:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2020-12-05T13:55:32.675642321Z 2020-12-05T13:55:32.666298Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22) starting as process 1
2020-12-05T13:55:32.677080715Z 2020-12-05T13:55:32.676995Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-12-05T13:55:33.170279960Z 2020-12-05T13:55:33.170051Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-12-05T13:55:33.267031149Z mysqld: Table 'mysql.plugin' doesn't exist
2020-12-05T13:55:33.267108584Z 2020-12-05T13:55:33.266947Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2020-12-05T13:55:33.269751968Z 2020-12-05T13:55:33.269595Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-12-05T13:55:33.292723398Z 2020-12-05T13:55:33.292504Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-12-05T13:55:33.345835499Z 2020-12-05T13:55:33.344910Z 0 [Warning] [MY-000054] [Server] World-writable config file './auto.cnf' is ignored.
2020-12-05T13:55:33.347128239Z 2020-12-05T13:55:33.346214Z 0 [Warning] [MY-010107] [Server] World-writable config file './auto.cnf' has been removed.
2020-12-05T13:55:33.348330151Z 2020-12-05T13:55:33.347479Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 8b1eb9c5-3701-11eb-998e-0242ac150003.
2020-12-05T13:55:33.374832119Z 2020-12-05T13:55:33.373880Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2020-12-05T13:55:33.380049235Z 2020-12-05T13:55:33.379133Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.
2020-12-05T13:55:33.380815872Z 2020-12-05T13:55:33.379917Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-12-05T13:55:33.384650009Z 2020-12-05T13:55:33.383625Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-12-05T13:55:33.386088291Z 2020-12-05T13:55:33.385087Z 0 [Warning] [MY-010284] [Server] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2020-12-05T13:55:33.392467688Z 2020-12-05T13:55:33.391389Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2020-12-05T13:55:33.394097485Z 2020-12-05T13:55:33.393006Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2020-12-05T13:55:33.395600683Z 2020-12-05T13:55:33.394488Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2020-12-05T13:55:33.396617814Z 2020-12-05T13:55:33.395441Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2020-12-05T13:55:33.399265374Z 2020-12-05T13:55:33.398067Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-12-05T13:55:33.400339362Z 2020-12-05T13:55:33.399178Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2020-12-05T13:55:33.401506902Z 2020-12-05T13:55:33.401258Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-12-05T13:55:34.893881350Z 2020-12-05T13:55:34.893445Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.
  • Вопрос задан
  • 105 просмотров
Подписаться 1 Простой Комментировать
Пригласить эксперта
Ответы на вопрос 1
@Qwyu_4iLofK Автор вопроса
Работает только
с image: mysql:5.7.22 и ниже, если использовать неименованный
volumes:
     - ".data:/var/lib/mysql"


с именованным volume работает и с 8 версией и выше. В чем причина, не знаю. Возможно, недоработка на стороне докера. Так не разобралась.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы