账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    mysql突然挂掉,重启失败,求助
    60
    0

    错误日志如下:

    2018-07-17T08:36:53.397517Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2018-07-17T08:36:53.399199Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.18-log) starting as process 23554 ...
    2018-07-17T08:36:53.404243Z 0 [Note] InnoDB: PUNCH HOLE support available
    2018-07-17T08:36:53.404288Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2018-07-17T08:36:53.404300Z 0 [Note] InnoDB: Uses event mutexes
    2018-07-17T08:36:53.404306Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2018-07-17T08:36:53.404313Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2018-07-17T08:36:53.404322Z 0 [Note] InnoDB: Using Linux native AIO
    2018-07-17T08:36:53.404691Z 0 [Note] InnoDB: Number of pools: 1
    2018-07-17T08:36:53.404845Z 0 [Note] InnoDB: Using CPU crc32 instructions
    2018-07-17T08:36:53.406591Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
    2018-07-17T08:36:53.421430Z 0 [Note] InnoDB: Completed initialization of buffer pool
    2018-07-17T08:36:53.424100Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
    2018-07-17T08:36:53.436515Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
    2018-07-17T08:36:53.438026Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 27659290414
    2018-07-17T08:36:53.456641Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 27659553841
    2018-07-17T08:36:53.456779Z 0 [Note] InnoDB: Database was not shutdown normally!
    2018-07-17T08:36:53.456913Z 0 [Note] InnoDB: Starting crash recovery.
    2018-07-17T08:36:53.475256Z 0 [Note] InnoDB: Transaction 49069703 was in the XA prepared state.
    2018-07-17T08:36:53.475706Z 0 [Note] InnoDB: Transaction 49069704 was in the XA prepared state.
    2018-07-17T08:36:53.475754Z 0 [Note] InnoDB: Transaction 49069705 was in the XA prepared state.
    2018-07-17T08:36:53.475781Z 0 [Note] InnoDB: 3 transaction(s) which must be rolled back or cleaned up in total 0 row operations to undo
    2018-07-17T08:36:53.475807Z 0 [Note] InnoDB: Trx id counter is 49070080
    2018-07-17T08:36:53.475892Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...
    InnoDB: Progress in percent: 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
    2018-07-17T08:36:53.989412Z 0 [Note] InnoDB: Apply batch completed
    2018-07-17T08:36:53.989477Z 0 [Note] InnoDB: Last MySQL binlog file position 0 901475605, file name master-bin.000012
    2018-07-17T08:36:54.096249Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
    2018-07-17T08:36:54.096249Z 0 [Note] InnoDB: Starting in background the rollback of uncommitted transactions
    2018-07-17T08:36:54.096352Z 0 [Note] InnoDB: Rollback of non-prepared transactions completed
    2018-07-17T08:36:54.096379Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
    2018-07-17T08:36:54.105279Z 0 [Warning] InnoDB: 1048576 bytes should have been written. Only 491520 bytes written. Retrying for the remaining bytes.
    2018-07-17T08:36:54.105340Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
    2018-07-17T08:362018-07-17T08:36:54.609409Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
    2018-07-17T08:36:54.609464Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
    2018-07-17T08:36:54.609485Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2018-07-17T08:36:54.609497Z 0 [ERROR] Failed to initialize plugins.
    2018-07-17T08:36:54.609505Z 0 [ERROR] Aborting

    2018-07-17T08:36:54.609549Z 0 [Note] Binlog end
    2018-07-17T08:36:54.609636Z 0 [Note] Shutting down plugin 'CSV'
    2018-07-17T08:36:54.610055Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

    这是什么原因?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 把心還给我 普通会员 1楼

      当MySQL服务器突然挂掉,重启失败时,可能有以下几个原因:

      1. 硬件故障:MySQL服务器的硬件设备可能出现了故障,如内存不足、硬盘空间不足、CPU过热等,导致MySQL无法启动。这时,您可以尝试以下步骤进行排查和解决:

      a. 检查硬件设备:检查MySQL服务器的内存、硬盘、CPU、网络设备等硬件设备,确保它们都正常工作。您可以使用性能监控工具(如监控工具、性能查询工具等)来监控硬件设备的运行状态,如CPU使用率、内存使用率、硬盘空间使用率等,找出性能瓶颈。

      b. 清理系统日志:查看MySQL服务器的日志文件,查看是否有明显的系统错误或性能问题,如内存泄漏、磁盘空间不足、数据库连接超时等。如果日志文件中包含相关信息,您可以尝试修复或解决这些问题。

      c. 检查MySQL配置:查看MySQL的配置文件,确保其配置文件中的一些关键参数(如数据库连接信息、并发连接数、系统日志日志等)正确无误。如果配置文件中存在错误,可能会导致MySQL无法启动。

      d. 重启MySQL服务:在MySQL服务器的管理工具(如MySQL控制台、MySQL Management Studio等)中,点击“服务”,找到MySQL服务并重启。重启完成后,重启MySQL服务器应该能够解决问题。

      e. 检查MySQL服务日志:重启MySQL服务后,查看MySQL服务器的系统日志,看是否有系统错误或性能问题的记录。如果系统日志中包含相关信息,您可以尝试修复或解决这些问题。

      1. 重启MySQL实例:如果MySQL服务器无法重启,可能是由于MySQL实例出现故障。您可以尝试以下步骤进行排查和解决:

      a. 检查MySQL实例状态:检查MySQL实例的状态,如是否处于运行状态、是否可用等。如果实例处于运行状态,可能是由于实例本身的故障导致。如果实例不可用,可能是由于实例挂载或负载均衡等问题导致。

      b. 删除MySQL实例:如果MySQL实例不可用,可能是由于实例挂载或负载均衡等问题导致。您可以尝试删除MySQL实例,然后重新创建实例。

      c. 重启MySQL实例:在MySQL服务器的管理工具(如MySQL控制台、MySQL Management Studio等)中,点击“实例”,找到并删除MySQL实例。然后重新创建实例。

      d. 重启MySQL服务:在MySQL服务器的管理工具(如MySQL控制台、MySQL Management Studio等)中,点击“服务”,找到MySQL服务并重启。重启完成后,重启MySQL实例应该能够解决问题。

      1. 安全审计:如果MySQL服务器无法重启,可能是由于安全审计或安全策略设置问题导致。您可以尝试进行安全审计,查看是否存在安全漏洞或风险。如果存在安全漏洞或风险,应进行相应的安全修复或更新。

      2. 使用MySQL热备份:如果MySQL服务器的硬件设备无法重启,可能是由于MySQL热备份问题导致。您可以尝试使用MySQL热备份功能,将MySQL数据库备份到其他地方,以防止数据丢失。在备份过程中,应确保MySQL服务是运行的,以便在需要时恢复备份数据。

      以上是一些可能的原因和解决方法,具体问题需要根据实际情况进行排查和解决。在重启过程中,务必谨慎操作,避免对MySQL服务和数据造成不必要的损害。如果您在排查过程中遇到困难,可以查阅MySQL官方文档或寻求MySQL技术支持的帮助。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部