mysql报错5_mysql5.5 启动报错:ERROR!_MySQL
bitsCN.com
在FreeBSD中啟動(dòng)mysql時(shí)報(bào)錯(cuò),ERROR! The server quit without updating PID file,通常這是可以查看數(shù)據(jù)庫(kù)目錄下的.err日志,里面會(huì)記錄一些具體的錯(cuò)誤信息,對(duì)排錯(cuò)相當(dāng)有用,內(nèi)容如下:
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
看到上面紅色字體,顯示錯(cuò)誤是出在日志文件大小上,于是查看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,在看看我的數(shù)據(jù)庫(kù)目錄下,日志文件大小是不是64M,如下圖,發(fā)現(xiàn)問(wèn)題了,日志文件是5242880是5M
找到問(wèn)題了,解決辦法可以更改配置文件,也可以刪除現(xiàn)在這個(gè)日志,再啟動(dòng)mysql這樣它會(huì)重新生成這兩個(gè)日志文件。
怎么會(huì)出現(xiàn)這個(gè)問(wèn)題呢?
一般來(lái)說(shuō),是由于,在my.cnf中關(guān)于INNODB的一些配置是被注釋的,在沒(méi)有更改的情況下,系統(tǒng)就使用了默認(rèn)值,這樣,當(dāng)你把關(guān)于innodb的配置選項(xiàng)注釋去掉的時(shí)候,就會(huì)出現(xiàn)這個(gè)報(bào)錯(cuò)!bitsCN.com
本文原創(chuàng)發(fā)布php中文網(wǎng),轉(zhuǎn)載請(qǐng)注明出處,感謝您的尊重!
總結(jié)
以上是生活随笔為你收集整理的mysql报错5_mysql5.5 启动报错:ERROR!_MySQL的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 程序员的炫酷动态科幻桌面壁纸
- 下一篇: python 列表 mysql in_关