MySQL - UNINSTALL PLUGIN Statement



In addition to existing server components, you can create a new required component in the server using the plugin API supported by the server. Using this API, you can install additional softwares such as storage engines, full-text parser plugins, and server extensions. You can install a MySQL plugin in MySQL using the INSTALL PLUGIN Statement.

MySQL UNINSTALL PLUGIN Statement

You can remove/uninstall an installed plugin using the UNINSTALL PLUGIN Statement. To execute this statement, you need DELETE privilege.

Syntax

Following is the syntax of the MySQL UNINSTALL PLUGIN statement −

UNINSTALL PLUGIN plugin_name

Where, plugin_name is the name of the plugin you need to uninstall.

Example

Assume we have installed a clone plugin using the INSTALL PLUGIN statement as shown below −

INSTALL PLUGIN clone SONAME 'mysql_clone.dll';

After installing the plugin, you can verify the its details as shown below −

SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'clone%';

Output

Following is the output of the above query −

PLUGIN_NAME PLUGIN_STATUS
clone ACTIVE

Following query removes the clone plugin installed above −

UNINSTALL PLUGIN clone;

Since we have uninstalled the clone plugin If you execute the above SELECT query again you will get an empty set −

SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'clone%';
Empty set (0.00 sec)

Example

Let us install two more plugins in MySQL using the INSTALL PLUGIN statement −

Install plugin validate_password soname 'validate_password.dll';
Install plugin mysql_no_login soname 'mysql_no_login.dll';

Following queries uninstalls the above installed plugins −

Uninstall plugin validate_password;
Uninstall plugin mysql_no_login;
Advertisements