mysql 突然无法启动原因排查

问题描述:

项目上线一直运行的非常的好,就在这几天mysql突然出现连接不上,去手动重启msyql也启动不了,找到mysql.log 日志文件,发现了一堆报错信息,报错信息如下:

2021-03-07T13:07:42.747281Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747304Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747309Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747313Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/chapter.ibd' OS error: 71
2021-03-07T13:07:42.747316Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747319Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747323Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747328Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/chapter`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747333Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/chapter` because it could not be opened.
2021-03-07T13:07:42.747351Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747355Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747359Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747362Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/edition.ibd' OS error: 71
2021-03-07T13:07:42.747365Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747368Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747371Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747374Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/edition`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747378Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/edition` because it could not be opened.
2021-03-07T13:07:42.747388Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747397Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747400Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747415Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/grade.ibd' OS error: 71
2021-03-07T13:07:42.747419Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747422Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747425Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747433Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/grade`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747437Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/grade` because it could not be opened.
2021-03-07T13:07:42.747447Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747450Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747453Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747456Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/knowledge_basic.ibd' OS error: 71
2021-03-07T13:07:42.747459Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747467Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747470Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747474Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/knowledge_basic`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747478Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/knowledge_basic` because it could not be opened.
2021-03-07T13:07:42.747487Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747497Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747501Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747506Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/knowledge_level.ibd' OS error: 71
2021-03-07T13:07:42.747510Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747514Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747519Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747523Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/knowledge_level`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747529Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/knowledge_level` because it could not be opened.
2021-03-07T13:07:42.747551Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747562Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747566Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747570Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/pharse.ibd' OS error: 71
2021-03-07T13:07:42.747574Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747587Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747591Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747595Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/pharse`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747604Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/pharse` because it could not be opened.
2021-03-07T13:07:42.747617Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747645Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747648Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747652Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/pharsegrade.ibd' OS error: 71
2021-03-07T13:07:42.747659Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747662Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747665Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747668Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/pharsegrade`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747672Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/pharsegrade` because it could not be opened.
2021-03-07T13:07:42.747682Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747729Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747732Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747735Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/question_knowledge_basic_id.ibd' OS error: 71
2021-03-07T13:07:42.747738Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747741Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747744Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747748Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/question_knowledge_basic_id`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747757Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/question_knowledge_basic_id` because it could not be opened.
2021-03-07T13:07:42.747767Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747770Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747773Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747776Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/questions.ibd' OS error: 71
2021-03-07T13:07:42.747779Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747782Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747791Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747796Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/questions`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747807Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/questions` because it could not be opened.
2021-03-07T13:07:42.747823Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747886Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747891Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747896Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './test@002dorange@002dtoken/subject.ibd' OS error: 71
2021-03-07T13:07:42.747900Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2021-03-07T13:07:42.747910Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2021-03-07T13:07:42.747915Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2021-03-07T13:07:42.747920Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `test@002dorange@002dtoken/subject`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2021-03-07T13:07:42.747925Z 0 [Warning] InnoDB: Ignoring tablespace `test@002dorange@002dtoken/subject` because it could not be opened.
2021-03-07T13:07:42.748999Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-03-07T13:07:42.749035Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-03-07T13:07:42.846343Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-03-07T13:07:42.847017Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2021-03-07T13:07:42.847030Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2021-03-07T13:07:42.847798Z 0 [Note] InnoDB: 5.7.20 started; log sequence number 62495148947
2021-03-07T13:07:42.847957Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/mysql/data/ib_buffer_pool
2021-03-07T13:07:42.848148Z 0 [Note] Plugin 'FEDERATED' is disabled.
2021-03-07T13:07:42.850021Z 0 [Note] InnoDB: Buffer pool(s) load completed at 210307 21:07:42
2021-03-07T13:07:42.850991Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2021-03-07T13:07:42.851152Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2021-03-07T13:07:42.851185Z 0 [Note] IPv6 is available.
2021-03-07T13:07:42.851215Z 0 [Note]   - '::' resolves to '::';
2021-03-07T13:07:42.851234Z 0 [Note] Server socket created on IP: '::'.
2021-03-07T13:07:42.859078Z 0 [Note] Event Scheduler: Loaded 0 events
2021-03-07T13:07:42.859270Z 0 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.7.20'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Server (GPL)
2021-03-07T13:07:42.859286Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 
2021-03-07T13:07:42.859289Z 0 [Note] Beginning of list of non-natively partitioned tables
2021-03-07T13:07:42.874246Z 0 [Note] End of list of non-natively partitioned tables
2021-03-07T13:07:43.019536Z 3 [Warning] Host name 'ecs-121-37-221-237.compute.hwclouds-dns.com' could not be resolved: Name or service not known
2021-03-07T13:07:44.212367Z 8 [Warning] Host name 'ecs-139-159-243-117.compute.hwclouds-dns.com' could not be resolved: Name or service not known
2021-03-07T13:09:00.045669Z 18 [Warning] Host name 'ecs-121-37-201-229.compute.hwclouds-dns.com' could not be resolved: Name or service not known

原因分析:

注意看到如下报错信息:

由此分析应该是由于磁盘满了导致mysql无法继续重新启动成功。


解决方案:

找到根目录:du -h -x --max-depth=1 找到相关的磁盘,删除一些日志,我这边的问题是发现mysql.log 等各种日志的大小已经非常大,然后再调节mysql日志大小自动删除。
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值