Joomla!-开源天空

2008-10-12
首页 专栏热点 LAMP开发与web 2.0 如何安装mysql plugin


如何安装mysql plugin

E-mail
安装Plugin的语法如下: 
INSTALL PLUGIN plugin_name SONAME 'plugin_library'

plugin_name 是在plugin声明中定义的plugin的名称,plugin名字大小写敏感可以由系统设置。plugin_library 是共享库的名字,共享库在 plugin的目录下,可能是静态或者动态库,比如:libmyplugin.so or libmyplugin.dylib

共享库必须放在plugin目录下, 目录是由plugin_dir 系统变脸该定义的,默认这个目录是由配置变量中的pkglibdir 定义的,可以在服务器启动时候改变,比如可以在my.cnf中设置:

[mysqld]
plugin_dir=/path/to/plugin/directory

如果设置相对目录,目录是相对mysql base的系统变量。

INSTALL PLUGIN 在mysql.plugin表中增加一行相关记录。同时INSTALL PLUGIN 会加载并初始化plugin。

To use INSTALL PLUGIN, you must have the INSERT privilege for the mysql.plugin table.

在服务器启动的时候,服务器会加载所有plugin中的 plugin,也就是仅仅需要运行一次 INSTALL PLUGIN ,如果启动时候--skip-grant-tables ,则不会加载plugin。

服务器关闭的时候,会关闭plugin.

要卸载plugin,需要用UNINSTALL PLUGIN :

SHOW PLUGIN 可以看到所有的安装的plugin

如果重新编译了plugin共享库,可以选择以下两种方法之一:

  • 卸载后重新安装

  • 关闭服务器,覆盖文件,重新启动。



收藏此文章:
Digg! Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!

发表您的文章评论

您的姓名 (昵称)
标题:
评分: 很差一般较好很好
评论:
验证码:
请输入验证码