全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3559|回复: 40
打印 上一主题 下一主题

卧槽,mysql启动不了了,,排查好久还是不行

[复制链接]
跳转到指定楼层
1#
发表于 2023-7-12 10:53:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
docker跑的mysql,,mjj帮忙看下

2023-07-12T02:22:13.451832649Z 2023-07-12 02:22:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:22:13.649282410Z 2023-07-12 02:22:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-07-12T02:22:13.657589728Z 2023-07-12 02:22:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:22:13.830518212Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-07-12T02:22:14.001969205Z 2023-07-12T02:22:13.999226Z 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.
2023-07-12T02:22:14.001988572Z 2023-07-12T02:22:13.999241Z 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.
2023-07-12T02:22:14.002005635Z 2023-07-12T02:22:13.999245Z 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.
2023-07-12T02:22:14.002008460Z 2023-07-12T02:22:13.999260Z 0 [Warning] [MY-000081] [Server] option 'thread_stack': unsigned value 65536 adjusted to 131072.
2023-07-12T02:22:14.002010684Z 2023-07-12T02:22:13.999272Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2023-07-12T02:22:14.002012568Z 2023-07-12T02:22:14.000144Z 0 [Warning] [MY-010101] [Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
2023-07-12T02:22:14.002014481Z 2023-07-12T02:22:14.000178Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1
2023-07-12T02:22:14.778839922Z 2023-07-12T02:22:14.778660Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-07-12T02:38:55.642015975Z 2023-07-12 02:38:55+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:38:55.843810885Z 2023-07-12 02:38:55+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-07-12T02:38:55.851698545Z 2023-07-12 02:38:55+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:38:56.028181486Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-07-12T02:38:56.207121749Z 2023-07-12T02:38:56.204049Z 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.
2023-07-12T02:38:56.207150254Z 2023-07-12T02:38:56.204066Z 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.
2023-07-12T02:38:56.207154301Z 2023-07-12T02:38:56.204071Z 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.
2023-07-12T02:38:56.207157147Z 2023-07-12T02:38:56.204085Z 0 [Warning] [MY-000081] [Server] option 'thread_stack': unsigned value 65536 adjusted to 131072.
2023-07-12T02:38:56.207159521Z 2023-07-12T02:38:56.204098Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2023-07-12T02:38:56.207162336Z 2023-07-12T02:38:56.205236Z 0 [Warning] [MY-010101] [Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
2023-07-12T02:38:56.207164551Z 2023-07-12T02:38:56.205297Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1
2023-07-12T02:38:56.394137661Z 2023-07-12T02:38:56.393982Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-07-12T02:41:25.077172346Z 2023-07-12 02:41:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:41:26.317304877Z 2023-07-12 02:41:26+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-07-12T02:41:26.325838935Z 2023-07-12 02:41:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:41:26.501392859Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-07-12T02:41:26.673532544Z 2023-07-12T02:41:26.670624Z 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.
2023-07-12T02:41:26.673692493Z 2023-07-12T02:41:26.670654Z 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.
2023-07-12T02:41:26.673727931Z 2023-07-12T02:41:26.670659Z 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.
2023-07-12T02:41:26.673731818Z 2023-07-12T02:41:26.670675Z 0 [Warning] [MY-000081] [Server] option 'thread_stack': unsigned value 65536 adjusted to 131072.
2023-07-12T02:41:26.673740335Z 2023-07-12T02:41:26.670689Z 0 [Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.
2023-07-12T02:41:26.673743351Z 2023-07-12T02:41:26.670726Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2023-07-12T02:41:26.673745895Z 2023-07-12T02:41:26.670810Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1
2023-07-12T02:41:26.897202989Z 2023-07-12T02:41:26.897006Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-07-12T02:47:29.006489337Z 2023-07-12 02:47:29+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:47:29.226627031Z 2023-07-12 02:47:29+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-07-12T02:47:29.237383828Z 2023-07-12 02:47:29+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
2023-07-12T02:47:29.409320378Z '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2023-07-12T02:47:29.580966846Z 2023-07-12T02:47:29.577361Z 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.
2023-07-12T02:47:29.581010659Z 2023-07-12T02:47:29.577380Z 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.
2023-07-12T02:47:29.581014398Z 2023-07-12T02:47:29.577385Z 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.
2023-07-12T02:47:29.581016912Z 2023-07-12T02:47:29.577400Z 0 [Warning] [MY-000081] [Server] option 'thread_stack': unsigned value 65536 adjusted to 131072.
2023-07-12T02:47:29.581019116Z 2023-07-12T02:47:29.577435Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2023-07-12T02:47:29.581034756Z 2023-07-12T02:47:29.577517Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1
2023-07-12T02:47:30.560387390Z 2023-07-12T02:47:30.560168Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
推荐
 楼主| 发表于 2023-7-12 12:44:00 | 只看该作者
@晴晴晴 @cscool @251768938
统一回复下,,,启动了, 是数据库表太大了, 初始化时间很长,,30分钟
2#
发表于 2023-7-12 10:55:41 | 只看该作者
这不是启动了吗/?
3#
 楼主| 发表于 2023-7-12 11:06:27 | 只看该作者
helloloc 发表于 2023-7-12 10:55
这不是启动了吗/?

[InnoDB] InnoDB initialization has started.
之后就没动了
4#
发表于 2023-7-12 11:13:49 | 只看该作者
没看到ERROR ,楼下大佬来
5#
发表于 2023-7-12 11:17:41 来自手机 | 只看该作者
直接找DBA
6#
发表于 2023-7-12 11:19:19 | 只看该作者
ps -ef | grep mysql

发出来
7#
发表于 2023-7-12 11:23:15 | 只看该作者
ChatGPT的回答
  1. 这些日志是MySQL服务器在Docker容器中运行时生成的输出。让我们逐条解释每个日志条目的含义:

  2. 1. `2023-07-12 02:22:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.`
  3.    这是MySQL服务器启动时的提示消息,表示MySQL容器的入口脚本已开始运行。

  4. 2. `2023-07-12 02:22:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'`
  5.    表示MySQL服务器正在切换到专用用户'mysql'。

  6. 3. `'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'`
  7.    这是一个符号链接操作,将`/var/lib/mysql/mysql.sock`链接到`/var/run/mysqld/mysqld.sock`。它用于与MySQL服务器建立套接字连接。

  8. 4. `[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.`
  9.    这是一个警告消息,指出`--skip-host-cache`语法已过时,并将在未来的版本中被移除。建议使用`SET GLOBAL host_cache_size=0`来替代。

  10. 5. `[Warning] [MY-000081] [Server] option 'thread_stack': unsigned value 65536 adjusted to 131072.`
  11.    这是一个警告消息,指出`thread_stack`选项的无符号值65536已被调整为131072。

  12. 6. `[Warning] [MY-000081] [Server] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824.`
  13.    这是一个警告消息,指出`max_allowed_packet`选项的无符号值107374182400已被调整为1073741824。

  14. 7. `[Warning] [MY-010101] [Server] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.`
  15.    这是一个警告消息,指出`--secure-file-priv`的配置存在安全风险,建议选择一个不容易被所有操作系统用户访问的不同目录。

  16. 8. `[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.31) starting as process 1`
  17.    表示MySQL服务器已经作为进程1开始启动。

  18. 9. `[System] [MY-013576] [InnoDB] InnoDB initialization has started.`
  19.    表示InnoDB存储引擎正在初始化。

  20. 这些日志提供了MySQL服务器在Docker容器中启动和配置过程中的一些关键信息、警告和提示。
复制代码
8#
发表于 2023-7-12 11:24:24 | 只看该作者
搞不懂为啥mysql也跑docker。。。。
9#
发表于 2023-7-12 11:27:32 | 只看该作者
没看到错误
10#
发表于 2023-7-12 11:28:37 | 只看该作者
如果MySQL启动后停留在"[InnoDB] InnoDB initialization has started."(InnoDB初始化已开始)的信息处,可能是因为InnoDB引擎遇到了一些问题而无法完成初始化。以下是一些可能的解决方法:

1. 查看错误日志:MySQL通常会在启动过程中生成错误日志文件。你可以查看该文件以获取有关发生的问题的更多详细信息。默认情况下,MySQL错误日志文件的位置可能是/var/log/mysql/error.log。

2. 检查配置文件:确保MySQL的配置文件(通常是my.cnf或my.ini)中的设置正确。特别是检查与InnoDB引擎相关的设置,如innodb_buffer_pool_size、innodb_log_file_size等。

3. 临时解决方案:尝试通过删除InnoDB日志文件来解决问题。首先停止MySQL服务,然后找到并备份数据目录中的InnoDB日志文件(通常是ib_logfile0和ib_logfile1)。删除这些文件后,尝试重新启动MySQL。

4. 检查磁盘空间:确保MySQL所在的磁盘分区有足够的可用空间。如果磁盘空间不足,InnoDB引擎可能无**确初始化。

5. 检查文件权限:确保MySQL数据目录及其文件的所有者和权限设置正确。MySQL需要对其数据目录具有适当的访问权限才能启动。

如果以上方法无法解决问题,我建议参考MySQL的官方文档、社区或论坛以获取更多帮助。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-4 02:18 , Processed in 0.151817 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表