[Bug] [mysql] 正常拉起容器后无法通过localhost:3306连接kag的mysql
Search before asking
- [x] I had searched in the issues and found no similar issues.
Operating system information
Linux
What happened
通过官方的yml文件正常拉起容器后,其他三个容器都能通过对应的端口正常连接,只有mysql无法通过localhost:3306去连接。看了日志显示一切就绪但报大量无法认证的警告,断开连接。不明白问题出在哪里。
How to reproduce
2025-05-27 16:42:11+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started. 2025-05-27 16:42:11+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-05-27 16:42:11+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.8+maria~focal started. 2025-05-27 16:42:12 0 [Note] mysqld (mysqld 10.5.8-MariaDB-1:10.5.8+maria~focal) starting as process 1 ... 2025-05-27 16:42:12 0 [Note] InnoDB: Using Linux native AIO 2025-05-27 16:42:12 0 [Note] InnoDB: Uses event mutexes 2025-05-27 16:42:12 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2025-05-27 16:42:12 0 [Note] InnoDB: Number of pools: 1 2025-05-27 16:42:12 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions 2025-05-27 16:42:12 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2025-05-27 16:42:12 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728 2025-05-27 16:42:12 0 [Note] InnoDB: Completed initialization of buffer pool 2025-05-27 16:42:12 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2025-05-27 16:42:12 0 [Note] InnoDB: 128 rollback segments are active. 2025-05-27 16:42:12 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2025-05-27 16:42:12 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2025-05-27 16:42:12 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2025-05-27 16:42:12 0 [Note] InnoDB: 10.5.8 started; log sequence number 309847; transaction id 337 2025-05-27 16:42:12 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2025-05-27 16:42:12 0 [Note] Plugin 'FEEDBACK' is disabled. 2025-05-27 16:42:12 0 [Note] InnoDB: Buffer pool(s) load completed at 250527 16:42:12 2025-05-27 16:42:12 0 [Note] Server socket created on IP: '::'. 2025-05-27 16:42:12 0 [Warning] 'proxies_priv' entry '@% root@101feb78868d' ignored in --skip-name-resolve mode. 2025-05-27 16:42:12 0 [Note] Reading of all Master_info entries succeeded 2025-05-27 16:42:12 0 [Note] Added new Master_info '' to hash table 2025-05-27 16:42:12 0 [Note] mysqld: ready for connections. Version: '10.5.8-MariaDB-1:10.5.8+maria~focal' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution 2025-05-27 16:43:48 6 [Warning] Aborted connection 6 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:49 7 [Warning] Aborted connection 7 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:50 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:51 9 [Warning] Aborted connection 9 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:52 10 [Warning] Aborted connection 10 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:52 11 [Warning] Aborted connection 11 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:53 12 [Warning] Aborted connection 12 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:53 13 [Warning] Aborted connection 13 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:53 14 [Warning] Aborted connection 14 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:53 15 [Warning] Aborted connection 15 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:53 16 [Warning] Aborted connection 16 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:54 17 [Warning] Aborted connection 17 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:43:58 18 [Warning] Aborted connection 18 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:44:11 19 [Warning] Aborted connection 19 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:44:42 21 [Warning] Aborted connection 21 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:44:42 20 [Warning] Aborted connection 20 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:45:47 22 [Warning] Aborted connection 22 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:45:57 23 [Warning] Aborted connection 23 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:45:58 24 [Warning] Aborted connection 24 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:49:13 26 [Warning] Aborted connection 26 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:49:23 25 [Warning] Aborted connection 25 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication) 2025-05-27 16:49:23 27 [Warning] Aborted connection 27 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.1' (This connection closed normally without authentication)
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
具体的启动参数是啥?如果是docker方式拉起server的话,server的localhost是指server所在的容器,并不不是mysql所在的容器。
就是官网的docker compose拉起 docker compose -f docker-compose.yml up -d
看起来是mysql没起来,试试删除镜像,重新拉
1、Check your local container status, normally it should be:
If port 3306 of release-openspg-mysql occupied by other processes,you an alter it in the docker-compose.yaml file.