>데이터 베이스 >MySQL 튜토리얼 >mysql5.5 启动报错:ERROR!_MySQL

mysql5.5 启动报错:ERROR!_MySQL

WBOY
WBOY원래의
2016-06-01 13:45:36904검색

bitsCN.com

 

在FreeBSD中启动mysql时报错,ERROR! The server quit without updating PID file,通常这是可以查看数据库目录下的.err日志,里面会记录一些具体的错误信息,对排错相当有用,内容如下:

110805 17:30:19 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql5.5/data

110805 17:30:19 InnoDB: The InnoDB memory heap is disabled

110805 17:30:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins

110805 17:30:19 InnoDB: Compressed tables use zlib 1.2.3

110805 17:30:19 InnoDB: Initializing buffer pool, size = 256.0M

110805 17:30:19 InnoDB: Completed initialization of buffer pool

InnoDB: Error: log file /usr/local/mysql5.5/data/ib_logfile0 is of different size 0 5242880 bytes

InnoDB: than specified in the .cnf file 0 67108864 bytes!

110805 17:30:19 [ERROR] Plugin 'InnoDB' init function returned error.

110805 17:30:19 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

110805 17:30:19 [ERROR] Unknown/unsupported storage engine: InnoDB

110805 17:30:19 [ERROR] Aborting

 

110805 17:30:19 [Note] /usr/local/mysql5.5/bin/mysqld: Shutdown complete

看到上面红色字体,显示错误是出在日志文件大小上,于是查看mysql的配置文件/etc/my.cnf

# Uncomment the following if you are using InnoDB tables

innodb_data_home_dir = /usr/local/mysql5.5/data

innodb_data_file_path = ibdata1:10M:autoextend

innodb_log_group_home_dir = /usr/local/mysql5.5/data

# You can set .._buffer_pool_size up to 50 - 80 %

# of RAM but beware of setting memory usage too high

innodb_buffer_pool_size = 256M

innodb_additional_mem_pool_size = 20M

# Set .._log_file_size to 25 % of buffer pool size

innodb_log_file_size = 64M

innodb_log_buffer_size = 8M

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

配置文件中指定了innodb_log_file_size=64M,在看看我的数据库目录下,日志文件大小是不是64M,如下图,发现问题了,日志文件是5242880是5M

mysql5.5 启动报错:ERROR!_MySQL

 

找到问题了,解决办法可以更改配置文件,也可以删除现在这个日志,再启动mysql这样它会重新生成这两个日志文件。

mysql5.5 启动报错:ERROR!_MySQL

 

怎么会出现这个问题呢?

一般来说,是由于,在my.cnf中关于INNODB的一些配置是被注释的,在没有更改的情况下,系统就使用了默认值,这样,当你把关于innodb的配置选项注释去掉的时候,就会出现这个报错!

bitsCN.com
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.