表“flyway_schema_history”未使用 LOCK TABLES 锁定

Oma*_*azi 4 java mysql spring flyway spring-boot

我正在尝试使用 Flyway 作为现有数据库的迁移工具,使用:

Flyway V5.2.4 & Mysql V8.0.16

但是当迁移时给我这个错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException: 
Error while retrieving the list of applied migrations from Schema History table `allexpress`.`flyway_schema_history`
------------------------------------------------------------------------------
SQL State  : HY000
Error Code : 1100
Message    : Table 'flyway_schema_history' was not locked with LOCK TABLES

Caused by: org.flywaydb.core.internal.exception.FlywaySqlException: 
Error while retrieving the list of applied migrations from Schema History table `allexpress`.`flyway_schema_history`
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException: 
Error while retrieving the list of applied migrations from Schema History table `allexpress`.`flyway_schema_history`
Run Code Online (Sandbox Code Playgroud)

小智 5

我最近遇到了这个错误。检查日志中的飞行路线警告。我有同样的错误消息,但问题来自于插入缺少值。