I have developed an app in python with SQLAlchemy. My MySQL test database is in version 8.0 and my product database is in 5.7. I did the migration between the database and there is no error. But when I connect to the product database, I obtain the error "1273 (HY000): Unknown collation: 'utf8mb4_0900_ai_ci'".
However, my structure don't contain "utf8mb4_0900_ai_ci". There is only "utf8mb4_general_ci". I specify that this error occurs only when I connect to the product database.
Connection to database:
engine = create_engine('mysql+mysqlconnector://user:***********@**********:3306/amatdb?charset=utf8mb4')
SQL example
DROP TABLE IF EXISTS `alembic_version`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `alembic_version` (
`version_num` varchar(32) NOT NULL,
PRIMARY KEY (`version_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
Thank you in advance for your help
Fixed : Just add "&collation=utf8mb4_general_ci'"
engine=create_engine('mysql+mysqlconnector://user:***********@**********:3306/amatdb?charset=utf8mb4&collation=utf8mb4_general_ci')