VPS侦探论坛

 找回密码
 注册
查看: 5714|回复: 1

[Oracle] 删除ib_logfile0和ib_logfile1后,启动Msyql失败

[复制链接]
发表于 2018-6-3 10:30:57 | 显示全部楼层 |阅读模式

root@jingmian:/var/log/mysql# cat errormysql.log
180603 10:05:28 [Note] Plugin 'FEDERATED' is disabled.
180603 10:05:28 InnoDB: The InnoDB memory heap is disabled
180603 10:05:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180603 10:05:28 InnoDB: Compressed tables use zlib 1.2.8
180603 10:05:28 InnoDB: Initializing buffer pool, size = 512.0M
180603 10:05:28 InnoDB: Completed initialization of buffer pool
180603 10:05:28 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
180603 10:05:28  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: trying to add tablespace 17 of name './qichechutan/jqy_machine_type.ibd'
InnoDB: to the tablespace memory cache, but tablespace
InnoDB: 17 of name './jianai/ja_admins.ibd' already exists in the tablespace
InnoDB: memory cache!


root@jingmian:/usr/local/mysql/var# service mysql start
Starting MySQL
. * The server quit without updating PID file (/usr/local/mysql/var/jingmian.pid).
我还想问下,我可以删除ibdata1文件吗?我百度搜说数据都存在这里,可以通过.frm和.ibd恢复数据,是真的?

[ 本帖最后由 cs5117155 于 2018-6-3 10:32 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-6-3 15:47:29 | 显示全部楼层


mysql的任何文件都不要直接删除,除非之前实现备份数据及文件

如果是用的innodb引擎,你可以下 /etc/my.cnf 中 是否设置了innodb_file_per_table,如果设置了值为1的话数据库的数据是还存在的,备份整个数据库目录, 然后再重新install上mysql的数据库应该是可以恢复的
如果是myisam引擎,数据还在
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-27 13:42 , Processed in 0.025399 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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