You are here: PHP Kernel Analytics> Main Web>Mysql启用Innodb2009-09-09, Laruence

Mysql启用Innodb

今天在一台服务器上安装最新的Mysql 5.1.35,通过源代码安装。 编译安装都很顺利,到执行

 
bin/mysql_install_db –user=mysql
就报了usr/local/mysql/libexec/mysqld: unknown variable ‘innodb_data_home_dir=/usr/local/mysql/var/’错误。 之前从来没有过,百思不得其解,Google了一下,发现原来是最新的MySQL默认不带innodb引擎。 于是重新编译,在configrue的时候,加上–with-plugins=innobase这个参数 之后可以进入数据库,执行
 
mysql>show plugin;
+------------+--------+----------------+--------------+---------+
| 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>install plugin innodb soname ‘ha_innodb.so’;

Topic revision: r1 - 2009-09-09 - 08:38:11 - Main.Laruence
 

TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Supported by Onemouse/风雪之隅 京ICP备09034578号
Ideas, requests, problems regarding PHP Kernel Analytics? Send feedback