当前位置:我的异常网» MySQL » mysql是否支持innodb的存储类型解决办法
mysql是否支持innodb的存储类型解决办法
www.myexceptions.net 网友分享于:2015-08-26 浏览:286次
mysql是否支持innodb的存储类型
查看mysql的存储引擎:
show plugins;
+------------+--------+----------------+--------------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+--------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb.so | GPL
mysql> show variables like "have_%";
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| have_community_features | YES |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_dynamic_loading | YES |
| have_geometry | YES |
| have_innodb | NO |
| have_ndbcluster | NO |
| have_openssl | NO |
| have_partitioning | NO |
| have_query_cache | YES |
| have_rtree_keys | YES |
| have_ssl | NO |
| have_symlink | YES |
第二步:试着安装innodb类型:
INSTALL PLUGIN INNODB SONAME 'ha_innodb.so';
安装成功。创建innodb表也成功。
第三步:修改.cnf的参数
wait_timeout = 172800
transaction-isolation = REPEATABLE-READ
binlog_format=mixed
innodb_fast_shutdown = 1
innodb_force_recovery =0
innodb_buffer_pool_size=4000M
innodb_log_file_size = 512M
innodb_file_per_table=1
query_cache_size=32M
innodb_data_file_path= ibdata1:10M;autoextend
无法启动服务器报:
InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 536870912 bytes!
120308 5:30:24 [ERROR] Plugin 'InnoDB' init function returned error.
120308 5:30:24 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
将 ib_logfile0删除mysqld服务可正常启动。
是不是这样安装的innodb的类型不支持?
启动mysqld之后
查看存储引擎:
mysql> show engines;
+------------+---------+-----------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+------------+---------+-----------------------+--------------+------+------------+
| CSV | YES | CSV storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
+------------+---------+-----------------------+--------------+------+------------+
mysql> show variables like 'have_%';
+-------------------------+-------+
| Variable_name | Value |
+-------------------------+-------+
| have_community_features | YES |
| have_compress | YES |
| have_crypt | YES |
| have_csv | YES |
| have_dynamic_loading | YES |
| have_geometry | YES |
| have_innodb | NO |
文章评论