删除ib_logfile0和ib_logfile1后,启动Msyql失败
root@jingmian:/var/log/mysql# cat errormysql.log180603 10:05:28 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:28InnoDB: 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 编辑 ] mysql的任何文件都不要直接删除,除非之前实现备份数据及文件
如果是用的innodb引擎,你可以下 /etc/my.cnf 中 是否设置了innodb_file_per_table,如果设置了值为1的话数据库的数据是还存在的,备份整个数据库目录, 然后再重新install上mysql的数据库应该是可以恢复的
如果是myisam引擎,数据还在
页:
[1]