ubuntu 安装 mysql 报错

33 篇文章 1 订阅

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

 

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

 

怎么会出现这个问题呢?

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值