MySQL - UNINSTALL COMPONENT Statement



MySQL UNINSTALL COMPONENT Statement

MySQL components is that which provides services (to server and other components). You can install a MySQL component in MySQL using the INSTALL COMPONENT Statement.

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

Syntax

Following is the syntax of the MySQL UNINSTALL PLUGIN statement −

UNINSTALL COMPONENT component_name [, component_name ] ...

Where, component_name is the name of the component you need to uninstall.

Example

Assume we have installed a MySQL component using the INSTALL COMPONENT statement as shown below −

INSTALL COMPONENT 'file://component_log_sink_syseventlog';

Following query uninstalls the above created component

UNINSTALL COMPONENT 'file://component_log_sink_syseventlog';

Example

Let us install few more plugins in MySQL using the INSTALL COMPONENT statement −

INSTALL COMPONENT 'file://component_validate_password';
INSTALL COMPONENT 'file://component_mysqlbackup';
INSTALL COMPONENT 'file://component_log_sink_json';
INSTALL COMPONENT 'file://component_log_filter_dragnet'; 

Following queries uninstalls the above installed components −

UNINSTALL COMPONENT 'file://component_log_sink_syseventlog';
UNINSTALL COMPONENT 'file://component_validate_password';
UNINSTALL COMPONENT 'file://component_mysqlbackup';
UNINSTALL COMPONENT 'file://component_log_sink_json';
UNINSTALL COMPONENT 'file://component_log_filter_dragnet';

Uninstalling multiple components

You can also uninstall multiple components in MySQL server using the INSTALL COMPONENT statement. You just need to separate the names of the components using commas.

Example

Assume we have created components in the previous example in one statement as shown below −

INSTALL COMPONENT 'file://component_validate_password', 
'file://component_mysqlbackup', 'file://component_log_sink_json', 
'file://component_log_filter_dragnet';

Following query un installs all the above components at once −

UNINSTALL COMPONENT 'file://component_validate_password', 
'file://component_mysqlbackup', 'file://component_log_sink_json', 
'file://component_log_filter_dragnet';
Advertisements