バックエンドの準備で「docker-compose up -d」でコンテナを作成しているが、
「osscal-db」が動作時に、以下のメッセージをだし、再起動を繰り返す。
2024-05-21 10:59:34 2024-05-21T01:59:34.409384Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
<省略>
2024-05-21 10:59:34 2024-05-21T01:59:34.474493Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-05-21 10:59:34 2024-05-21T01:59:34.637884Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-05-21 10:59:34 2024-05-21T01:59:34.638239Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-05-21 10:59:34 2024-05-21T01:59:34.653406Z 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.
2024-05-21 10:59:34 2024-05-21T01:59:34.654261Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-05-21 10:59:34 2024-05-21T01:59:34.654839Z 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
2024-05-21 10:59:34 2024-05-21T01:59:34.654894Z 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.
2024-05-21 10:59:34 2024-05-21T01:59:34.655230Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'.
2024-05-21 10:59:34 2024-05-21T01:59:34.657888Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-05-21 10:59:36 2024-05-21T01:59:36.180510Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.
2024-05-21 10:59:36 2024-05-21T01:59:36.180549Z 0 [System] [MY-015016] [Server] MySQL Server - end.
Docker、docker-composeのバージョン等に問題があるのでしょうか。
Docker version 26.1.3, build b72abbb
docker-compose: version 1.29.2
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known (SQL: insert into oauth_clients (user_id, name, secret, provider, redirect, personal_access_client, password_client, revoked, updated_at, created_at) values (?, OSSCalendar Personal Access Client, 3ABpMgh9F9Ph0z2eUYjyL2JyoVAXaZnJPv5jYChS, ?, http://localhost, 1, 0, 0, 2024-05-21 11:11:42, 2024-05-21 11:11:42))
発生環境
ubuntu 22.04
Docker version 26.1.3, build b72abbb
docker-compose: version 1.29.2
Node.js: v18.20.2
npm: 10.5.0
nvm: 0.35.3
不具合概要
バックエンドの準備で「docker-compose up -d」でコンテナを作成しているが、 「osscal-db」が動作時に、以下のメッセージをだし、再起動を繰り返す。
2024-05-21 10:59:34 2024-05-21T01:59:34.409384Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables <省略> 2024-05-21 10:59:34 2024-05-21T01:59:34.474493Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2024-05-21 10:59:34 2024-05-21T01:59:34.637884Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2024-05-21 10:59:34 2024-05-21T01:59:34.638239Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2024-05-21 10:59:34 2024-05-21T01:59:34.653406Z 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. 2024-05-21 10:59:34 2024-05-21T01:59:34.654261Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables 2024-05-21 10:59:34 2024-05-21T01:59:34.654839Z 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 2024-05-21 10:59:34 2024-05-21T01:59:34.654894Z 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. 2024-05-21 10:59:34 2024-05-21T01:59:34.655230Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'. 2024-05-21 10:59:34 2024-05-21T01:59:34.657888Z 0 [ERROR] [MY-010119] [Server] Aborting 2024-05-21 10:59:36 2024-05-21T01:59:36.180510Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL. 2024-05-21 10:59:36 2024-05-21T01:59:36.180549Z 0 [System] [MY-015016] [Server] MySQL Server - end.
Docker、docker-composeのバージョン等に問題があるのでしょうか。 Docker version 26.1.3, build b72abbb docker-compose: version 1.29.2
また、当然、osscal-dbが起動できていないので、 php artisan passport:install 等で、以下のエラーとなります。
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known (SQL: insert into
oauth_clients
(user_id
,name
,secret
,provider
,redirect
,personal_access_client
,password_client
,revoked
,updated_at
,created_at
) values (?, OSSCalendar Personal Access Client, 3ABpMgh9F9Ph0z2eUYjyL2JyoVAXaZnJPv5jYChS, ?, http://localhost, 1, 0, 0, 2024-05-21 11:11:42, 2024-05-21 11:11:42))発生環境 ubuntu 22.04 Docker version 26.1.3, build b72abbb docker-compose: version 1.29.2 Node.js: v18.20.2 npm: 10.5.0 nvm: 0.35.3
ヘルプ、回答、よろしくお願いします。