安装mysql镜像报错

22.03系统
docker run --name tmp_mysql
-e MYSQL_ROOT_PASSWORD=123456
-p 3306:3306
-v /opt/mysql/data:/var/lib/mysql
mysql:8.0.41
2025-05-18 11:00:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.41-1.el9 started.
2025-05-18 11:00:07+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
2025-05-18 11:00:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.41-1.el9 started.
2025-05-18 11:00:08+00:00 [Note] [Entrypoint]: Initializing database files
2025-05-18T11:00:08.046013Z 0 [Warning] [MY-011068] [Server] The syntax ‘–skip-host-cache’ is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2025-05-18T11:00:08.046127Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.41) initializing of server in progress as process 80
2025-05-18T11:00:08.056827Z 0 [Warning] [MY-010001] [Server] Can’t create thread to handle bootstrap (errno: 1)
2025-05-18T11:00:08.056902Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2025-05-18T11:00:08.056915Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2025-05-18T11:00:08.056924Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-05-18T11:00:08.057367Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.41) MySQL Community Server - GPL.
出现问题,请教怎么解决?

/opt/mysql/data 这个目录是否存在,还有权限,里面有东西的话清空再试试

开始就已经授权了chmod -R 750 /opt/mysql/data

把 /opt/mysql 目录删掉,然后直接启动容器试试

直接启动还是报错