打印

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

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

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 编辑 ]

TOP

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

如果是用的innodb引擎,你可以下 /etc/my.cnf 中 是否设置了innodb_file_per_table,如果设置了值为1的话数据库的数据是还存在的,备份整个数据库目录, 然后再重新install上mysql的数据库应该是可以恢复的
如果是myisam引擎,数据还在

LNMP付费问题排查/LNMP技术支持/Paypal信用卡代付/代购VPS,域名,软件等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 要求反馈问题!

TOP