Set up MySQL as MLflow's Backend Store
You can follow these steps to create and configure a MySQL database for use as the MLflow backend store.
Steps to setup
- Log in to MySQL.
mysql -u root -p
Enter your MySQL root password when prompted.
- Create a new database.
CREATE DATABASE mlflow;
Replace mlflow_db
with your preferred database name.
- Create a user (optional but recommended).
CREATE USER 'mlflow'@'%' IDENTIFIED BY 'mlflow';
Replace mlflow_user
and your
`_
password` with your desired username and strong password.
- Grant privileges to the user.
GRANT ALL PRIVILEGES ON mlflow.* TO 'mlflow'@'%';
FLUSH PRIVILEGES;
- Exit MySQL.
EXIT;
- Test connection from your MLflow server machine.
mysql -u mlflow_user -p -h <mysql_host> mlflow_db
- Replace
<mysql_host>
with your MySQL server IP or hostname.
Example MLflow backend store URI for MySQL:
mysql+pymysql://mlflow:mlflow@10.100.11.10:3306/mlflow
Notes:
- Make sure the MySQL server allows remote connections if MLflow runs on a different system.
Was this page helpful?