Thread Pool Plugin Usage Example
These parameters are also called system variables, which are used to set service functions and performance of MySQL. For details, see the official MySQL document Server System Variables.
After the patch is applied, you can directly compile and install the thread pool plugin. Alternatively, after the compilation is successful, you can copy the thread_pool.so file from the plugin_output_directory/ directory in the compilation path to the directory specified by plugin_dir of the target MySQL, and then install the plugin.
Installation methods:
- Using a SQL statement:
- Using a configuration file:
Add parameter settings to the my.cnf file. The plugin installed using this method takes effect only after the system is restarted. Example:
1plugin-load-add=thread_pool.so
Run the SHOW PLUGINS statement to check whether the thread pool plugin is successfully installed.

Uninstalling the plugin:
- To uninstall the thread pool plugin, you must run the UNINSTALL command.
1UNINSTALL PLUGIN thread_pool;
- If there is a parameter setting for loading the thread pool plugin in the configuration file, you can delete the setting after running the UNINSTALL command, so that the plugin will not be loaded in the next restart.
1plugin-load-add=thread_pool.so
Run the SHOW PLUGINS statement to check whether the thread pool plugin is successfully uninstalled.
- After the thread pool plugin is installed, the original connection scheduler is retained to process the connection requests sent before the plugin is installed. The thread pool connection scheduler processes new connection requests.
- After the thread pool plugin is uninstalled, the connections for initiating the UNINSTALL process are retained, and other connections are disconnected.