Home > Database > Mysql Tutorial > mysql_plugin - Configure the MySQL server plug-in

mysql_plugin - Configure the MySQL server plug-in

WBOY
Release: 2023-08-31 14:33:07
forward
712 people have browsed it

mysql_plugin - 配置 MySQL 服务器插件

Let us understand the mysql_plugin utility used in MySQL -

The mysql_plugin utility allows the MySQL administrator to manage the plugins loaded by the MySQL server.

It provides an alternative to specifying the --plugin-load option manually at server startup, or at runtime with the help of the INSTALL PLUGIN and UNINSTALL PLUGIN statements.

Depending on whether mysql_plugin is called to enable or disable the plug-in, the utility inserts or deletes rows, respectively, in the mysql.plugin table used as the plug-in registry.

For normal server startup, the server automatically loads and enables the plug-ins listed in mysql.plugin.

p>

For additional control over plugin activation, the --plugin_name option can be used naming a specific plugin.

Each call to mysql_plugin reads a configuration file that helps determine how to configure the plug-ins contained in a single plug-in library file. To call mysql_plugin, you can use the following command -

mysql_plugin [options] plugin {ENABLE|DISABLE}
Copy after login

The "plugin" here refers to the name of the plug-in to be configured.

ENABLE or DISABLE are case-insensitive and are used to specify whether to enable or disable components of the plug-in. Plug-in library, named in the configuration file.

The order of plugins and ENABLE or DISABLE parameters does not matter.

Let us take an example to understand this - < /p>

To configure a component of a plugin library file named "myplugins.so" on Linux or "myplugins.dll" on Windows, A plugin value for myplugins must be specified.

Assume that this plug-in library contains three plug-ins, namely plugin1, plugin2, and plugin3. These three plug-ins need to be configured under the control of mysql_plugin.

According to convention, the suffix of the configuration file is .ini, and the same basic name is the name of the plug-in library, so the default configuration file name of the plug-in library is "myplugins.ini".

The configuration file content is as follows -

myplugins
plugin1
plugin2
plugin3
Copy after login

The first line in the myplugins.ini file is the name of the library file without any extension, such as .so or .dll.

The remaining lines are the names of components that need to be enabled or disabled.

Each value in the file should be on a separate line.

Lines whose first character is "#" are treated as comments and ignored. < /p>

To enable the plugins listed in the configuration file, the mysql_plugin mentioned below must be called -

shell> mysql_plugin myplugins ENABLE
Copy after login

To disable the plugin, DISABLE should be used instead of ENABLE.

If mysql_plugin cannot find the configuration file or plug-in library file, or mysql_plugin cannot start the MySQL server, an error will occur.

p>

mysql_plugin supports the options mentioned below. They can be specified on the command line or in the [mysqld] group of any option file.

--help, -?

It helps to display a help message and exit.

--basedir=dir_name, -b dir_name

refers to the server base directory.

--datadir=dir_name, -d dir_name

refers to the server data directory.

--my-print-defaults=file_name, -b file_name

refers to the path where the my_print_defaults program is located.

--mysqld=file_name, -b file_name

It refers to the path of the mysqld server.

--no-defaults, -p

It means that no values ​​should be read from the configuration file. This option enables administrators to skip reading default values ​​from the configuration file.

--plugin-dir=dir_name, -p dir_name

It is the server plug-in directory.

--verbose, -v

refers to verbose mode. It prints more information about the program's functionality. This option can be used multiple times to increase the amount of information.

--version,-V

Help displays version information and exits.

The above is the detailed content of mysql_plugin - Configure the MySQL server plug-in. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template