VPS侦探论坛

 找回密码
 注册
搜索
热搜: pathinfo
查看: 204|回复: 2

[Oracle] InnoDB数据库进程无法启动了

[复制链接]
发表于 2019-3-13 18:50:05 | 显示全部楼层 |阅读模式


Starting MySQL. ERROR! The server quit without updating PID file (/www/data/twk2.pid).系统:centos6.9   2核4G安装的lnmp1.5  数据库引擎默认的是InnoDB,今天手欠发现产生很多错误日志,就点开一个wordpress网站的数据库,点修复报错,然后想着优化一下,就点了一下优化,然后phpmyadmin的root账户直接就从控制面板退出了,后面再登录phpmyadmin就提示Warning: mysqli::mysqli(): (HY000/2002): No such file or directory重启mysql,就提示




按照咱们论坛的方法修改了数据库目录的权限,重启依然不起作用。
错误日志文件太大了,我直把从新的部分,也是重复的部分保留了,麻烦军哥有空帮看看这是什么情况?以前也出现过这种情况,重装数据库后,原来InnoDB类型的数据库导入失败,直接把文件拷贝过去,在phpmyadmin里面看数据库,显示不出来那些数据库文件。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org/
发表于 2019-3-14 09:14:32 | 显示全部楼层



2019-03-13T04:43:11.683455Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2019-03-13T04:43:11.683489Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-03-13T04:43:11.683494Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2019-03-13T04:43:11.683500Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mylshuo_com/wp1_commentmeta.ibd' OS error: 71
2019-03-13T04:43:11.683505Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2019-03-13T04:43:11.683509Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-03-13T04:43:11.683514Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2019-03-13T04:43:11.683520Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `mylshuo_com/wp1_commentmeta`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2019-03-13T04:43:11.683527Z 0 [Warning] InnoDB: Ignoring tablespace `mylshuo_com/wp1_commentmeta` because it could not be opened.
2019-03-13T04:43:11.683547Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2019-03-13T04:43:11.683552Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-03-13T04:43:11.683557Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2019-03-13T04:43:11.683562Z 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mylshuo_com/wp1_comments.ibd' OS error: 71
2019-03-13T04:43:11.683566Z 0 [ERROR] InnoDB: Operating system error number 2 in a file operation.
2019-03-13T04:43:11.683570Z 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-03-13T04:43:11.683585Z 0 [ERROR] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.
2019-03-13T04:43:11.683591Z 0 [ERROR] InnoDB: Could not find a valid tablespace file for `mylshuo_com/wp1_comments`. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.

innodb是不能直接拷贝目录的,拷贝了也没法用,只能是导出数据库才行

美国VPS、VPN、域名代购:http://shop63846532.taobao.com/

 楼主| 发表于 2019-3-15 16:38:29 | 显示全部楼层

回复 2# 的帖子


嗯 ,谢谢军哥,已经解决了,这种问题遇到的次数还是挺多的,之前也遇到过,后面把服务器重装了,innobd数据库类型的数据全废了,好在没几个网站,这次从网上找修复Starting MySQL. ERROR! The server quit without updating PID file (/www/data/twk2.pid)  的方法,找了很多但几乎没用,最好找把InnoDB类型的数据库导出方法才找到了,步骤:整体备份原来的数据库文件夹,删除数据库文件夹下面的ib_logfile0和ib_logfile1文件夹,然后修改数据库配置文件my.cnf,在[mysqld] 下面加入innodb_force_recovery=4,保存,连接ssh重启数据库服务,就可以启动起来了,现在登录phpmyadmin可以登录了,但这不是长久解决问题的办法,于是导出需要的innodb类型数据库文件,再导入到其它服务器上就可以读出来了。如果你卸载了原来的数据库重装了数据库,那只需要备份新数据库下面的ibdata1,拷入原来备份的数据库下面的ibdata1文件到新的数据库下面,按上面的步骤重新操作一次就可以了,导出数据库文件后,把备份的新安装的数据库下面的ibdata1文件恢复回去,删除ib_logfile0和ib_logfile1文件和数据库配置文件my.cnf里面之前加入的innodb_force_recovery=4,重启服务器导入你前面导出的.sql数据库文件就可以了。网上 其他那些修改数据库目录权限,把localhost修改成127.0.0.1那些方法试了都不起作用,修改后数据库服务该启不来还是启动不起来。
美国VPS推荐: 遨游主机LinodeLOCVPSKVMLAVPS2EZ搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2019-5-22 07:58 , Processed in 0.043496 second(s), 27 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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