My SQL
This section describes how to use MySQL (https://www.mysql.com/) as the metadata database. MySQL can help scale the usage of the application to a large number of users and ensure smooth and efficient access to the metadata which is used for various purposes like the Web Application, Jupyter, Artifact Bundle creation, etc.
Supported versions: MySQL 5.7+
We use sqlalchemy's MySQL dialect to connect to the MySQL server - this can be set up using multiple methods that are described in https://docs.sqlalchemy.org/en/13/dialects/mysql.html.
We recommend using mysqlclient. To use this, an additional dependency (mysqlclient) needs to be
installed with the following components:
- API
- Celery - API worker
mysqlclient is a python package and can be installed using pip in the virtualenv created for these components.
PyPI link: https://pypi.org/project/mysqlclient/
Installation
$INSTALL_DIR/venv-api/bin/pip install mysqlclient
Additionally, mysqlclient also requires the "MySQL-client devel libraries" and headers to be installed.
This can be done with:
RedHat:
yum install python3-devel mysql-devel
Ubuntu:
apt install python3-dev default-libmysqlclient-dev build-essential
Configurations
In the API configurations, the following configurations need to be set:
SQLALCHEMY_DATABASE_URI = 'mysql://<username>:<password>@<hostname>/<dbname>
Needs to be set to be able to connect to the Database.- Also, check the other configurations that may be required as described in API - Configurations > SQLAlchemy section