MySQL Server enables user-defined functions (UDFs) to be created and loaded to extend server capabilities. Server capabilities can be implemented in whole or in part using UDFs. In addition, you can write your own UDFs.
MySQL distributions include UDFs that implement, or help to implement, several server capabilities:
Group Replication enables you to create a highly available distributed MySQL service across a group of MySQL server instances, with data consistency, conflict detection and resolution, and group membership services all built-in. See Chapter 18, Group Replication.
MySQL Enterprise Edition includes UDFs that perform encryption operations based on the OpenSSL library. See Section 6.6, “MySQL Enterprise Encryption”.
MySQL Enterprise Edition includes UDFs that provide an SQL-level API for performing masking and de-identification operations. See Section 6.5.1, “MySQL Enterprise Data Masking and De-Identification Elements”.
MySQL Enterprise Edition includes audit logging for monitoring and logging of connection and query activity. See Section 6.4.5, “MySQL Enterprise Audit”, and Section 6.4.6, “The Audit Message Component”.
MySQL Enterprise Edition includes a firewall capability that implements an application-level firewall to enable database administrators to permit or deny SQL statement execution based on matching against allowlists of accepted statement patterns. See Section 6.4.7, “MySQL Enterprise Firewall”.
A query rewriter examines statements received by MySQL Server and possibly rewrites them before the server executes them. See Section 5.6.4, “The Rewriter Query Rewrite Plugin”
Version Tokens enables creation of and synchronization around server tokens that applications can use to prevent accessing incorrect or out-of-date data. See Section 5.6.6, “Version Tokens”.
The MySQL Keyring provides secure storage for sensitive information. See Section 6.4.4, “The MySQL Keyring”.
A locking service provides a locking interface for application use. See Section 18.104.22.168, “The Locking Service”.
A UDF for accessing query attributes. See Section 9.6, “Query Attributes”.
The following sections describe how to install and uninstall UDFs, and how to determine at runtime which UDFs are installed and obtain information about them. For a table listing user-defined functions, see Section 12.2, “User-Defined Function Reference”. For information about writing UDFs, see Adding Functions to MySQL.
In some cases, a UDF is installed by installing the component that implements it, rather than by installing the UDF directly. For details about a particular UDF, see the installation instructions for the server feature that includes it.