title: 'MySQL Catalog Connector' sidebar_label: 'MySQL' description: 'Connect to a MySQL database as a catalog provider for federated SQL query.' sidebar_position: 9 pagination_prev: null pagination_next: null tags:
Connect to a MySQL database as a catalog provider for federated SQL query. The MySQL Catalog Connector automatically discovers schemas and tables within a MySQL server and makes them available for querying in Spice.
For connecting to individual MySQL tables, see the MySQL Data Connector documentation.
fromThe from field specifies the catalog provider. For MySQL, use mysql.
nameThe name field specifies the name of the catalog in Spice. Tables from the MySQL server will be available under this catalog name. The schema hierarchy of the MySQL server is preserved in Spice.
includeUse the include field to specify which tables to include from the catalog. The include field supports glob patterns to match multiple tables. For example, *.my_table_name would include all tables with the name my_table_name from any schema. Multiple include patterns are OR'ed together.
paramsConnection can be configured using a connection string or individual parameters.
| Parameter Name | Description |
|---|---|
mysql_connection_string | A MySQL connection string. E.g. mysql://user:password@host:port/dbname. |
| Parameter Name | Description |
|---|---|
mysql_host | The MySQL host address. Default: localhost. |
mysql_tcp_port | The MySQL port number. Default: 3306. |
mysql_db | The MySQL database name. |
mysql_user | The MySQL username for authentication. |
mysql_pass | The MySQL password for authentication. |
mysql_sslmode | The SSL mode for the connection (disabled, required, or preferred). Default: required. |
mysql_sslrootcert | Path to the SSL root certificate file. |
Spice integrates with multiple secret stores to help manage sensitive data securely. For detailed information on supported secret stores, refer to the secret stores documentation. Additionally, learn how to use referenced secrets in component parameters by visiting the using referenced secrets guide.