In this section, we’ll walk through how to install the MySQL connector library. The connector library installation process is the same for all additional libraries and we’ll end this section with the recommended connector library for each database.
To figure out how to install the of your choice.
In the example, we’ll walk through the process of installing a MySQL driver in Superset.
As we are currently running inside of a Docker container via docker compose
, we cannot simply run pip install mysqlclient
on our local shell and expect the drivers to be installed within the Docker containers for superset.
Create requirements-local.txt
Add the driver selected in step above:
Rebuild your local image with the new driver baked in:
After the rebuild of the Docker images is complete (which make take a few minutes) you can relaunch using the following command:
Now that you’ve got a MySQL driver installed locally, you should be able to test it out.
We can now create a Datasource in Superset that can be used to connect to a MySQL instance. Assuming your MySQL instance is running locally and can be accessed via localhost, use the following connection string in “SQL Alchemy URI”, by going to Sources > Databases > + icon (to add a new datasource) in Superset.
For Docker running in Linux:
For Docker running in OSX:
You can repeat this process for every database you want superset to be able to connect to.