mysql dba系统学习(11)管理innodb引擎的redo log日志的一个问题

我的my.cnf文件是这样的

innodb_data_home_dir = /usr/local/mysql/var
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/var
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M

innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

结果启动的时候报错如下:

130904 16:26:00 [ERROR] /usr/local/mysql/libexec/mysqld: unknown variable 'innod
b_data_file_path=ibdata1:10M:autoextend'
130904 16:26:00 [ERROR] Aborting

130904 16:26:00 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

130904 16:26:00 mysqld_safe mysqld from pid file /usr/local/mysql/var/test4.wolf
.org.pid ended

我查看得知

>show variables like 'have%';

如果 have_innodb = NO 的话,那确实是编译的时候innodb没有加载进去。

那么需要重新编译的时候 ./configure ... --with-plugins=innobase 


唉唉唉唉,只有重新编译了


[root@test4 mysql-5.1.70]# ./configure --prefix=/usr/local/mysql --enable-assembler --datadir=/mysql/data --with-client-ldflags=-all-static--with-unix-socket-path=/tmp --with-charset=utf8 --enable-thread-safe-client --with-pthread --without-debug --with-big-tables --enable-community-features --enable-profiling --enable-local-infile --with-fast-mutexes --with-plugins=partition,federated,ndbcluster,innobase,csv,blackhole,myisam,innodb_plugin


[root@test4 mysql-5.1.70]# make && strip sql/mysqld && make install


如果你编译安装 的时候编译了innnodb但是还是出现这位洋的问题,那么就这么解决


解决如下: 
/var/lib/mysql目录下,删除ibdata1、ib_logfile1、 ib_logfile0,然后重启MySql让其重建以上文件: 
mysqladmin -uroot -p shutdown 
sudo mysqld_safe & 
搞定!



本文转自陈仲阳0 51CTO博客,原文链接:http://blog.51cto.com/wolfword/1288657

上一篇:mysql 用户已设置密码,但登录可以不填密码


下一篇:Ubuntu10.04 添加中文输入法,设置开机自动启动