# Installing and Updating an Extension

MySQL supports a variety of <span class="s1">**plugins**</span> that extend the functionality of the database engine. These plugins add features like authentication methods, full-text search improvements, audit logging, and more. Popular examples include `<span class="s3">auth_socket</span>`, `<span class="s3">validate_password</span>`, and `<span class="s3">audit_log</span>`. In Elestio-hosted MySQL instances, many common plugins are already available and can be enabled or disabled as needed. This guide explains how to install, manage, and troubleshoot MySQL plugins and verify compatibility with different MySQL versions.

## **Installing and Enabling Plugins**

In MySQL, plugins are usually installed globally at the server level, not per-database. If the plugin binaries are available, they can be loaded dynamically at runtime without restarting the server.

Start by connecting to your MySQL database using a client like <span class="s3">mysql</span>:

```mysql
mysql -u root -p -h your-elestio-hostname
```

To enable a plugin, use the <span class="s1">INSTALL PLUGIN</span> command. For example, to enable the `<span class="s1">validate_password</span>` plugin:

```mysql
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
```

You can verify that the plugin is installed by checking the plugin list:

```mysql
SHOW PLUGINS;
```

To enable a plugin automatically at server startup, add its configuration in the <span class="s1">my.cnf</span> file. However, for managed Elestio instances, this may require support team intervention unless custom configuration access is provided.

## **Checking Plugin Availability &amp; Compatibility**

Plugins must be compiled for the specific MySQL version and platform. Before upgrading MySQL or installing a new plugin, verify that a compatible version is available for your target setup. You can find plugin binaries under the <span class="s1">plugin\_dir</span>, which you can locate with:

```mysql
SHOW VARIABLES LIKE 'plugin_dir';
```

To check if a specific plugin is installed and active:

```mysql
SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'validate_password';
```

If a plugin is incompatible or missing from the <span class="s1">plugin\_dir</span>, the server will return an error when you attempt to install it. In this case, contact Elestio support to request installation or confirm version compatibility.

## **Updating or Uninstalling Plugins**

After a MySQL version upgrade, some plugins may need to be reinstalled or updated. If a plugin is malfunctioning after an upgrade, it is good practice to uninstall and reinstall it:

```mysql
UNINSTALL PLUGIN validate_password;
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
```

Not all plugins support automatic upgrades. You should consult plugin-specific documentation or Elestio’s compatibility matrix before proceeding.

## **Troubleshooting Common Plugin Issues**

<table border="1" id="bkmrk-issue-cause-resoluti" style="border-collapse: collapse; border-width: 1px; border-color: rgb(0, 0, 0);"><thead><tr><th style="border-color: rgb(0, 0, 0);">**Issue**

</th><th style="border-color: rgb(0, 0, 0);">**Cause**

</th><th style="border-color: rgb(0, 0, 0);">**Resolution**

</th></tr></thead><tbody><tr><td style="border-color: rgb(0, 0, 0);">Can't open shared library

</td><td style="border-color: rgb(0, 0, 0);">Plugin binary not found in <span class="s1">plugin\_dir</span>

</td><td style="border-color: rgb(0, 0, 0);">Check if the `<span class="s1">.so</span>` file exists and has correct permissions; contact Elestio if needed

</td></tr><tr><td style="border-color: rgb(0, 0, 0);">Plugin already installed

</td><td style="border-color: rgb(0, 0, 0);">Attempting to install a plugin that is already active

</td><td style="border-color: rgb(0, 0, 0);">Use `<span class="s1">SHOW PLUGINS</span>` to verify and avoid duplicate installation

</td></tr><tr><td style="border-color: rgb(0, 0, 0);">Permission denied

</td><td style="border-color: rgb(0, 0, 0);">Current user lacks `SUPER` privilege

</td><td style="border-color: rgb(0, 0, 0);">Log in as a user with `SUPER` or administrative rights

</td></tr><tr><td style="border-color: rgb(0, 0, 0);">Plugin is not loaded at startup

</td><td style="border-color: rgb(0, 0, 0);">Plugin not defined in configuration file

</td><td style="border-color: rgb(0, 0, 0);">Contact Elestio to add it to the MySQL startup config (`<span class="s1">my.cnf</span>`)

</td></tr></tbody></table>

## **Security Considerations**

Plugins can have significant control over database behavior. Only enable trusted plugins from verified sources. Avoid enabling plugins you do not need, as they can introduce security or performance risks. Always test plugin behavior in a staging environment before deploying to production.