gradlew flywaymigrate 和用户拒绝访问
Posted
技术标签:
【中文标题】gradlew flywaymigrate 和用户拒绝访问【英文标题】:gradlew flywaymigrate and Access denied for user 【发布时间】:2021-07-27 06:18:39 【问题描述】:我可以使用用户 ID/密码很好地连接到 mysql,但是当我使用 gradlew 时,我收到了这个错误:
C:\dev\project>gradlew flywayMigrate -Dflyway.password=*****
> Configure project :
Running gradle version: 4.10.3
> Task :Core:flywayMigrate FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Core:flywayMigrate'.
> Error occurred while executing flywayMigrate
Unable to obtain connection from database (jdbc:mysql://localhost:3306/sr?serverTimezone=UTC) for user 'userid': Access denied for user 'userid'@'localhost' (using password: YES)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL State : 28000
Error Code : 1045
Message : Access denied for user 'userid'@'localhost' (using password: YES)
Access denied for user 'userid'@'localhost' (using password: YES)
在 profile-dev.gradle 中验证用户 ID 和密码正确。有什么想法吗?
【问题讨论】:
【参考方案1】:跳过密码就可以了
gradlew flywayMigrate
谢谢!
【讨论】:
以上是关于gradlew flywaymigrate 和用户拒绝访问的主要内容,如果未能解决你的问题,请参考以下文章
在“sbt-native-packager”脚本中使用除“sbt run”之外的其他 sbt 命令。例如:“sbt flywayMigrate”
SSO统一身份认证——CAS Server6.3.x中gradlew的使用