MySQL启动报错解决一例_MySQL

WBOY
풀어 주다: 2016-06-01 13:13:19
원래의
1092명이 탐색했습니다.

由于项目需要不得不折腾MySQL,RedHatLinux上安装了最新的MySQL 5.6启动报错如下:

[root@tserver mysql]# /etc/init.d/mysql start
Starting MySQL.The server quit without updating PID file (/var/lib/mysql/tserver.pid).[FAILED]

检查报错信息tserver.err。

cat tserver.err

140121 06:03:29 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2014-01-21 06:03:29 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-01-21 06:03:29 14964 [Note] Plugin 'FEDERATED' is disabled.
2014-01-21 06:03:29 14964 [Note] InnoDB: The InnoDB memory heap is disabled
2014-01-21 06:03:29 14964 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-01-21 06:03:29 14964 [Note] InnoDB: Compressed tables use zlib 1.2.3
2014-01-21 06:03:29 14964 [Note] InnoDB: Using Linux native AIO
2014-01-21 06:03:29 14964 [Note] InnoDB: Using CPU crc32 instructions
2014-01-21 06:03:29 14964 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2014-01-21 06:03:29 14964 [Note] InnoDB: Completed initialization of buffer pool
2014-01-21 06:03:29 14964 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2014-01-21 06:03:29 14964 [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!
2014-01-21 06:03:29 14964 [ERROR] Plugin 'InnoDB' init function returned error.
2014-01-21 06:03:29 14964 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-01-21 06:03:29 14964 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-01-21 06:03:29 14964 [ERROR] Aborting

2014-01-21 06:03:29 14964 [Note] Binlog end
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'partition'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_METRICS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMPMEM'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_CMP'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_LOCKS'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'INNODB_TRX'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'BLACKHOLE'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'ARCHIVE'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'CSV'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'MEMORY'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'MRG_MYISAM'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'MyISAM'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'sha256_password'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'mysql_old_password'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'mysql_native_password'
2014-01-21 06:03:29 14964 [Note] Shutting down plugin 'binlog'
2014-01-21 06:03:29 14964 [Note] /usr/sbin/mysqld: Shutdown complete

检查发现mysql的目录下有如下文件:


[root@tserver mysql]# ls
ibdata1  ib_logfile0  ib_logfile1  mysql  RPM_UPGRADE_HISTORY  RPM_UPGRADE_MARKER-LAST  test  tserver.err

删除了如下三个文件:

[root@tserver mysql]# rm ibdata1  ib_logfile0  ib_logfile1
rm: remove regular file `ibdata1'? yes     
rm: remove regular file `ib_logfile0'? yes
rm: remove regular file `ib_logfile1'? yes

重新启动mysql server就可以了:

[root@tserver mysql]# /etc/init.d/mysql start
Starting MySQL.[  OK  ]
[root@tserver mysql]# ps -ef|grep mysql
root    15166    1  0 06:12 pts/0    00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/tserver.pid
mysql    15257 15166  9 06:12 pts/0    00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/tserver.err --pid-file=/var/lib/mysql/tserver.pid
root    15284 14224  0 06:12 pts/0    00:00:00 grep mysql

 

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!