This documentation describes the integration of MindsDB with MariaDB, one of the most popular open source relational databases. The integration allows MindsDB to access data from MariaDB and enhance MariaDB with AI capabilities.
Before proceeding, ensure the following prerequisites are met:
Establish a connection to MariaDB from MindsDB by executing the following SQL command and providing its handler name as an engine.
Or:
Required connection parameters include the following:
user
: The username for the MariaDB database.password
: The password for the MariaDB database.host
: The hostname, IP address, or URL of the MariaDB server.port
: The port number for connecting to the MariaDB server.database
: The name of the MariaDB database to connect to.Or:
url
: You can specify a connection to MariaDB Server using a URI-like string, as an alternative connection option. You can also use mysql://
as the protocol prefixOptional connection parameters include the following:
ssl
: Boolean parameter that indicates whether SSL encryption is enabled for the connection. Set to True to enable SSL and enhance connection security, or set to False to use the default non-encrypted connection.ssl_ca
: Specifies the path to the Certificate Authority (CA) file in PEM format.ssl_cert
: Specifies the path to the SSL certificate file. This certificate should be signed by a trusted CA specified in the ssl_ca
file or be a self-signed certificate trusted by the server.ssl_key
: Specifies the path to the private key file (in PEM format).use_pure
(True
by default): Whether to use pure Python or C Extension. If use_pure=False
and the C Extension is not available, then Connector/Python will automatically fall back to the pure Python implementation.The following usage examples utilize the connection to MariaDB made via the CREATE DATABASE
statement and named mariadb_conn
.
Retrieve data from a specified table by providing the integration and table name.
Database Connection Error
SQL statement cannot be parsed by mindsdb_sql