Facing issue with Azure Flexibel Mysql Server 8.0 with Mlflow while using pymsql.
System information
- Docker Image: ghcr.io/mlflow/mlflow:v2.5.0
- pymysql 1.1.0
- mysqlclient 2.2.0
- Azure Mysql 8.0
- MLflow Version 2.5.0
The first error i was getting
sqlalchemy.exc.NotSupportedError: (MySQLdb.NotSupportedError) (1235, "This version of MySQL doesn't yet support 'existing primary key drop without adding a new primary key. In @@sql_generate_invisible_primary_key=ON mode table should have a primary key. Please add a new primary key to be able to drop existing primary key.'")
For the first error I tried below command on Azure mysql server and above error has gone but but it gives second error.
mysql> SET sql_generate_invisible_primary_key=OFF;
The second error i was getting
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1060, "Duplicate column name 'step'") [SQL: ALTER TABLE metrics ADD COLUMN step BIGINT NOT NULL DEFAULT '0']
MySQL [(none)]> use amit4;
MySQL [amit4]> desc metrics;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| key | varchar(250) | NO | PRI | NULL | |
| value | float | NO | | NULL | |
| timestamp | bigint | NO | PRI | NULL | |
| run_uuid | varchar(32) | NO | PRI | NULL | |
| step | bigint | NO | | 0 | |
+-----------+--------------+------+-----+---------+-------+
5 rows in set (0.004 sec)
MySQL [amit4]>
This is the command which ran with container
mlflow server --host 0.0.0.0 -p 5100 --backend-store-uri mysql+pymysql://USERNAME:PASSWORD@DBURL:3306/amit4 --artifacts-destination wasbs://amitg@amit4.blob.core.windows.net --serve-artifacts
I tried with below mysql docker image and it worked on local but same version of Azure Mysql 8.0 it didnt work but it worked with Azure Mysql 5.7.
mysql:8.0
mysql/mysql-server:8.0
Facing issue with Azure Flexibel Mysql Server 8.0 with Mlflow while using pymsql.
System information
The first error i was getting
sqlalchemy.exc.NotSupportedError: (MySQLdb.NotSupportedError) (1235, "This version of MySQL doesn't yet support 'existing primary key drop without adding a new primary key. In @@sql_generate_invisible_primary_key=ON mode table should have a primary key. Please add a new primary key to be able to drop existing primary key.'")For the first error I tried below command on Azure mysql server and above error has gone but but it gives second error.
mysql> SET sql_generate_invisible_primary_key=OFF;The second error i was getting
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (1060, "Duplicate column name 'step'") [SQL: ALTER TABLE metrics ADD COLUMN step BIGINT NOT NULL DEFAULT '0']This is the command which ran with container
mlflow server --host 0.0.0.0 -p 5100 --backend-store-uri mysql+pymysql://USERNAME:PASSWORD@DBURL:3306/amit4 --artifacts-destination wasbs://amitg@amit4.blob.core.windows.net --serve-artifactsI tried with below mysql docker image and it worked on local but same version of Azure Mysql 8.0 it didnt work but it worked with Azure Mysql 5.7.
mysql:8.0
mysql/mysql-server:8.0