MySQL
This connector provides functionality for MySQL databases. It also supports MariaDB.
It is included by default in AWS/Azure/Docker/VM distributions.
Installation and Configuration
SlashDB version >= 2.0.0 must be installed before the connector can be installed. If you don't have SlashDB yet, see the Installation documentation.
From System Package
If SlashDB was installed from the DEB or RPM package, or if you have SlashDB running from a virtual machine or cloud images, the easiest way to add MySQL support is by downloading and installing the corresponding connector package of the same type.
Debian or Ubuntu
wget https://downloads.slashdb.com/versions/2.0.1/slashdb-mysql_1.0.0_amd64.deb
sudo apt-get update
sudo apt-get install -y ./slashdb-mysql_1.0.0_amd64.deb
Red Hat
wget https://downloads.slashdb.com/versions/2.0.1/slashdb-mysql-1.0.0.x86_64.rpm
sudo dnf install -y ./slashdb-mysql-1.0.0.x86_64.rpm
SlashDB will then automatically restart for the changes to take effect.
From Python Wheel
If SlashDB was installed as a Python package, it is recommended to install the MySQL connector as a Python package in the same environment.
Available wheel packages:
Download and install the package that matches your version of Python, e.g.:
wget https://downloads.slashdb.com/versions/2.0.1/slashdb_mysql-1.0.0-cp39-cp39-manylinux2014_x86_64.whl
/opt/slashdb/bin/pip install ./slashdb_mysql-1.0.0-cp39-cp39-manylinux2014_x86_64.whl
After installation, SlashDB must be restarted manually.
Adding a Database Instance
-
In the menu, click on Database Connections, then click the New button in the top right corner
-
Select the MySQL type from the database selection screen
(If you are setting up a MariaDB connection, select MariaDB on this screen)
-
Fill in the configuration details for your database, then click the Next button
-
Set the database ID and other options for your database connection, then click the Create button
Editing a Database Connection
To edit an existing database connection, go to the Database Connections list and click the Edit icon in the Actions column, or click on the database ID.
The edit form is divided into three sections: Connection, Configuration, Privileges
Connection
- Description - an optional description for the connection
- Type - the database vendor type
- Database Charset - the character set used for string types
- Database Schema - the name of the database server schema to use
- Database Host - the hostname or IPv4 address of the database server
- Database Port - the port number that the database server listens on
- Database Name - the name of the database on the server to use
Configuration
- Connect Automatically - automatically connect to the database whenever SlashDB starts
-
Cache Schema - cache the database schema after the first connection so that subsequent connections complete faster
Important
Whenever your database structure changes, you will need to disable this option, disconnect/reconnect, and then enable it again. If your database structure changes frequently, you may want to disable it entirely.
-
Auto Discover - automatically find all tables and views in your database whenever SlashDB connects
Database Credentials
Pick one of:
- Local - the Database Login and Database Password to use for database reflection
- Credential Reference - the Database Credentials to use for database reflection
Privileges
- Connect / Disconnect DB - users with privileges to control the database connection
- View DB Config - users with privileges to view the database configuration
- Modify DB Config - users with privileges to edit or delete the database configuration
Updating
To update, install a newer version of the package.
Important
After updating the core SlashDB RPM/DEB package, you must reinstall plugins