您的位置:首页 > 数据库 > MySQL

MySQL5.1.45 Innodb plugin安装记录

2012-10-25 16:27 441 查看
原文件地址:http://hi.baidu.com/chenliujin/item/0715f8144a566a5c2b3e22ab

[root@mysql ~]# more /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted

先关selinux 否则尽报错
mysql> INSTALL PLUGIN INNODB SONAME 'ha_innodb_plugin.so';
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.so' (errno: 13 cannot restore segment prot after reloc: Permission denied)

确认plugin
[root@mysql ~]# ll /usr/local/mysql/lib/mysql/plugin/ha_innodb*
-rw-r--r-- 1 mysql mysql 6184832 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb.a
-rwxr-xr-x 1 mysql mysql    1007 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb.la
-rw-r--r-- 1 mysql mysql 6939024 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.a
-rwxr-xr-x 1 mysql mysql    1056 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.la
lrwxrwxrwx 1 mysql mysql      25 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.so -> ha_innodb_plugin.so.0.0.0
lrwxrwxrwx 1 mysql mysql      25 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.so.0 -> ha_innodb_plugin.so.0.0.0
-rwxr-xr-x 1 mysql mysql 4964406 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb_plugin.so.0.0.0
lrwxrwxrwx 1 mysql mysql      18 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb.so -> ha_innodb.so.0.0.0
lrwxrwxrwx 1 mysql mysql      18 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb.so.0 -> ha_innodb.so.0.0.0
-rwxr-xr-x 1 mysql mysql 4543316 Apr 23 22:16 /usr/local/mysql/lib/mysql/plugin/ha_innodb.so.0.0.0

mysql>INSTALL PLUGIN INNODB SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_TRX SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_LOCKS SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_LOCK_WAITS SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_CMP SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_CMP_RESET SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_CMPMEM SONAME 'ha_innodb_plugin.so';
mysql>INSTALL PLUGIN INNODB_CMPMEM_RESET SONAME 'ha_innodb_plugin.so'

mysql> show engines;
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                    | Transactions | XA   | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| CSV        | YES     | CSV storage engine                                         | NO           | NO   | NO         |
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys | YES          | YES  | YES        |
| 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         |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                      | NO           | NO   | NO         |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)

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_plugin.so | GPL     |
| INNODB_TRX          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_LOCKS        | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_LOCK_WAITS   | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_CMP          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_CMP_RESET    | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_CMPMEM       | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so | GPL     |
+---------------------+--------+--------------------+---------------------+---------+
13 rows in set (0.00 sec)

mysql> select @@innodb_version;
+------------------+
| @@innodb_version |
+------------------+
| 1.0.6            |
+------------------+
1 row in set (0.00 sec) http://hi.baidu.com/jyoe/blog/item/421caf3f5407dbe23c6d97e2.html[/code] 
                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: