Chinaunix首页 | 论坛 | 博客
  • 博客访问: 237104
  • 博文数量: 50
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 533
  • 用 户 组: 普通用户
  • 注册时间: 2015-07-28 21:56
个人简介

活着,寻找生存。

文章分类

全部博文(50)

文章存档

2017年(1)

2016年(20)

2015年(29)

我的朋友

分类: Mysql/postgreSQL

2016-03-08 17:53:31

在启动mysql出现如下错误:

2016-03-08 17:22:01 21968 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 768 pages (rounded down to MB) than specified in the .cnf file: initial 65536 pages, max 0 (relevant if non-zero) pages!
2016-03-08 17:22:01 21968 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2016-03-08 17:22:01 21968 [ERROR] Plugin 'InnoDB' init function returned error.
2016-03-08 17:22:01 21968 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-03-08 17:22:01 21968 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-03-08 17:22:01 21968 [ERROR] Aborting

检查发现mysql的目录下有如下文件:
root># ll -lth
总用量 109M
-rw-r----- 1 mysql mysql  26K 3月   8 17:30 error.log
-rw-rw---- 1 mysql mysql  588 3月   8 17:30 slow.log
-rw-rw---- 1 mysql mysql    0 3月   8 17:30 innodb_status.22965
-rw-rw---- 1 mysql mysql    0 3月   8 17:30 innodb_status.22042
-rw-rw---- 1 mysql mysql    0 3月   8 17:27 innodb_status.22022
-rw-rw---- 1 mysql mysql    0 3月   8 17:22 innodb_status.21968
-rw-rw---- 1 mysql mysql    0 3月   8 17:05 innodb_status.20987
-rw-rw---- 1 mysql mysql    0 3月   8 17:05 mybinlog.index
-rw-rw-r-- 1 mysql mysql  182 3月   8 17:04 mysqld_multi.log
-rw-rw---- 1 mysql mysql  12M 3月   8 16:40 ibdata1
-rw-rw---- 1 mysql mysql  48M 3月   8 16:40 ib_logfile0
drwx------ 2 mysql mysql 4.0K 3月   8 16:40 mysql
drwx------ 2 mysql mysql 4.0K 3月   8 16:40 performance_schema
-rw-rw---- 1 mysql mysql  48M 3月   8 16:40 ib_logfile1
drwx------ 2 mysql mysql 4.0K 3月   8 16:40 test

删除标红的三个文件:
mysql>$ rm -rf ibdata1 ib_logfile0 ib_logfile1

重启数据库。


阅读(10389) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~