OpenBMB/XAgent

mysqld: Table 'mysql.plugin' doesn't exist

Opened this issue · 1 comments

Issue Description / 问题描述

Please provide a detailed description of the error or issue you encountered. / 请详细描述您遇到的错误或问题。
多台机器上都无法运行mysql容器

Steps to Reproduce / 复现步骤

Please provide the specific steps to reproduce the error. / 请提供复现错误的具体步骤。
docker compose up中mysql报错

Expected Behavior / 预期行为

Describe the behavior you expected to see. / 请描述您期望的正确行为。

Environment / 环境信息

  • Operating System / 操作系统:
  • windows 11
  • Python Version / Python 版本:
  • python 3.11.4
  • Other Relevant Information / 其他相关信息:

Error Screenshots or Logs / 错误截图或日志

If possible, please provide relevant screenshots or logs of the error. / 如果可能,请提供相关的错误截图或日志文件。
WARN[0000] /mnt/c/Users/lazym/Documents/XAgent/docker-compose.yml: version is obsolete
[+] Running 5/0
✔ Container xagent-db-1 Running 0.0s
✔ Container xagent-ToolServerNode-1 Running 0.0s
✔ Container xagent-xagent-redis-1 Running 0.0s
✔ Container xagent-xagent-mysql-1 Created 0.0s
✔ Container xagent-ToolServerManager-1 Running 0.0s
Attaching to XAgent-Server, ToolServerManager-1, ToolServerNode-1, db-1, xagent-mysql-1, xagent-redis-1
xagent-mysql-1 | 2024-06-17 10:27:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
xagent-mysql-1 | 2024-06-17 10:27:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
xagent-mysql-1 | 2024-06-17 10:27:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
xagent-mysql-1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
xagent-mysql-1 | 2024-06-17T10:27:18.268927Z 0 [System] [MY-015015] [Server] MySQL Server - start.
xagent-mysql-1 | 2024-06-17T10:27:18.477987Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1
xagent-mysql-1 | 2024-06-17T10:27:18.490356Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
xagent-mysql-1 | 2024-06-17T10:27:18.632379Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
xagent-mysql-1 | mysqld: Table 'mysql.plugin' doesn't exist
xagent-mysql-1 | 2024-06-17T10:27:18.752296Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
xagent-mysql-1 | 2024-06-17T10:27:18.752481Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.752620Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.752746Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.753033Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.753244Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.753434Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.753615Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.789072Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
xagent-mysql-1 | 2024-06-17T10:27:18.854373Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
xagent-mysql-1 | 2024-06-17T10:27:18.860935Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
xagent-mysql-1 | 2024-06-17T10:27:18.860997Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
xagent-mysql-1 | 2024-06-17T10:27:18.867165Z 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.
xagent-mysql-1 | 2024-06-17T10:27:18.867646Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
xagent-mysql-1 | 2024-06-17T10:27:18.867978Z 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
xagent-mysql-1 | 2024-06-17T10:27:18.868029Z 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.
xagent-mysql-1 | 2024-06-17T10:27:18.868189Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=caching_sha2_password'.
xagent-mysql-1 | 2024-06-17T10:27:18.869086Z 0 [ERROR] [MY-010119] [Server] Aborting
xagent-mysql-1 | 2024-06-17T10:27:20.409581Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0) MySQL Community Server - GPL.
xagent-mysql-1 | 2024-06-17T10:27:20.409664Z 0 [System] [MY-015016] [Server] MySQL Server - end.
xagent-mysql-1 exited with code 1
dependency failed to start: container xagent-xagent-mysql-1 exited (1)

Additional Notes / 其他备注

If you have any additional information or notes, please add them here. / 如果有其他补充信息,请在此处添加。
docker inspect mysql容器结果:
[
{
"Id": "aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020",
"Created": "2024-06-17T10:07:13.598707334Z",
"Path": "docker-entrypoint.sh",
"Args": [
"--default-authentication-plugin=caching_sha2_password",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci"
],
"State": {
"Status": "exited",
"Running": false,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 0,
"ExitCode": 1,
"Error": "",
"StartedAt": "2024-06-17T10:23:16.608145093Z",
"FinishedAt": "2024-06-17T10:23:19.309384805Z",
"Health": {
"Status": "unhealthy",
"FailingStreak": 0,
"Log": []
}
},
"Image": "sha256:fcd86ff8ce8c2d30f02607e184cbfd73eb581e22a451e4a1847a102318bc2926",
"ResolvConfPath": "/var/lib/docker/containers/aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020/hostname",
"HostsPath": "/var/lib/docker/containers/aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020/hosts",
"LogPath": "/var/lib/docker/containers/aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020/aaebc513469e024d5528f39eebcb0a2c93957cbad838f67527da849948db3020-json.log",
"Name": "/xagent-xagent-mysql-1",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/mnt/c/Users/lazym/Documents/XAgent/XAgentServer/database/sql:/docker-entrypoint-initdb.d:rw"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "tool-server-network",
"PortBindings": {
"3308/tcp": [
{
"HostIp": "",
"HostPort": "3308"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
0,
0
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "host",
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": [],
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"Mounts": [
{
"Type": "volume",
"Source": "2ae34be83a7c3a1a691a13cccf615f26588c9d918dce0da052b2e087b21f9599",
"Target": "/var/lib/mysql"
}
],
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/c9e736cec389dc86e5eee8f5eed0b8d73d9d364a5cd9d226a244a3dc7b734e7f-init/diff:/var/lib/docker/overlay2/0ac3c8ef33042a4a6040de61f0cd9a6ea8c8425cba516f1e12e682dfb2880852/diff:/var/lib/docker/overlay2/350cb8ab642d463cb192b20b4f37ec4fe6d185761ac5d0778b0c42a7a83a8bb7/diff:/var/lib/docker/overlay2/7bad8870150db36f4bda9876aa8d0c5a62208b50d5a5a98962e223c65838600a/diff:/var/lib/docker/overlay2/b7a85a1fd298d7e57b9ebae0604cbdacf9e6e53af9063e0d45b9374ec1d9c9a8/diff:/var/lib/docker/overlay2/6bdf02ddee4808497fd253f827daa706e375a6dd3144599976bc0ff986adbfbd/diff:/var/lib/docker/overlay2/1e85aea3404d5dfd9531c01bcdd97a0aed5dc60a354c7b72d15db93d1a59538f/diff:/var/lib/docker/overlay2/763f83295cc9902a9347cae2bc7d5a5d20ee6d9a11854f4f2029cc5ad155b0f6/diff:/var/lib/docker/overlay2/bce095ac6354bc7eb287ddb86f12512f08a5a0b70664bb93d8f0d59cb16ec0f0/diff:/var/lib/docker/overlay2/2cf723f278afd29b64365f3759f7f5e1dc8d4b0103eefa0b4f300ecffed180c7/diff:/var/lib/docker/overlay2/fca8984ac6b59c7ce4c08df8bf41509017b8de499a90fbd0cac5704e446574da/diff",
"MergedDir": "/var/lib/docker/overlay2/c9e736cec389dc86e5eee8f5eed0b8d73d9d364a5cd9d226a244a3dc7b734e7f/merged",
"UpperDir": "/var/lib/docker/overlay2/c9e736cec389dc86e5eee8f5eed0b8d73d9d364a5cd9d226a244a3dc7b734e7f/diff",
"WorkDir": "/var/lib/docker/overlay2/c9e736cec389dc86e5eee8f5eed0b8d73d9d364a5cd9d226a244a3dc7b734e7f/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/mnt/c/Users/lazym/Documents/XAgent/XAgentServer/database/sql",
"Destination": "/docker-entrypoint-initdb.d",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "2ae34be83a7c3a1a691a13cccf615f26588c9d918dce0da052b2e087b21f9599",
"Source": "/var/lib/docker/volumes/2ae34be83a7c3a1a691a13cccf615f26588c9d918dce0da052b2e087b21f9599/_data",
"Destination": "/var/lib/mysql",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "aaebc513469e",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"3306/tcp": {},
"33060/tcp": {},
"3308/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"MYSQL_ROOT_PASSWORD=xagent",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GOSU_VERSION=1.17",
"MYSQL_MAJOR=8.4",
"MYSQL_VERSION=8.4.0-1.el9",
"MYSQL_SHELL_VERSION=8.4.0-1.el9"
],
"Cmd": [
"--default-authentication-plugin=caching_sha2_password",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci"
],
"Healthcheck": {
"Test": [
"CMD-SHELL",
"mysql -h localhost -u root -pxagent -e 'SELECT 1'"
],
"Timeout": 20000000000,
"Retries": 20
},
"Image": "mysql",
"Volumes": {
"/var/lib/mysql": {}
},
"WorkingDir": "",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "a0ca7ed4d5e5330b63587f1d95799cc1fdf27fb8006dc43818fead2afaa67f71",
"com.docker.compose.container-number": "1",
"com.docker.compose.depends_on": "",
"com.docker.compose.image": "sha256:fcd86ff8ce8c2d30f02607e184cbfd73eb581e22a451e4a1847a102318bc2926",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "xagent",
"com.docker.compose.project.config_files": "/mnt/c/Users/lazym/Documents/XAgent/docker-compose.yml",
"com.docker.compose.project.working_dir": "/mnt/c/Users/lazym/Documents/XAgent",
"com.docker.compose.replace": "45a54fd70868919fd92cad8d16629c45f6d1ba8d93f5e4c22d1914e3172f197f",
"com.docker.compose.service": "xagent-mysql",
"com.docker.compose.version": "2.27.0",
"desktop.docker.io/wsl-distro": "Ubuntu"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "b00dae9f1f8688c9c05a0bde302845137856e5568a05093388d9c6c439c574ed",
"SandboxKey": "/var/run/docker/netns/b00dae9f1f86",
"Ports": {},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"tool-server-network": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"xagent-xagent-mysql-1",
"xagent-mysql"
],
"MacAddress": "",
"NetworkID": "36ac17273f37f765de57433784034245504661e62374080fc05fa1085ed0fafc",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DriverOpts": null,
"DNSNames": [
"xagent-xagent-mysql-1",
"xagent-mysql",
"aaebc513469e"
]
}
}
}
}
]

The latest version of MySql is not working, you can use mysql:8.3 and it should work. The docker-compose.yml file should look like:

services:
  ...
  xagent-mysql:
    image: mysql:8.3
    command:
  ...

Change the .yml file, delete the service and recreate it again with docker-compose up --build -d xagent-mysql (or re-create everything if you want)