gpt4 book ai didi

mysql - Flyway 4.0.3 无法连接到 MySQL 服务器 8.0.17

转载 作者:行者123 更新时间:2023-11-29 15:42:26 24 4
gpt4 key购买 nike

最近我将本地MySQL从5.7更新到8.0.17以修复一个已知错误(重启后不保留ID自增序列),之后Flyway(4.0.3)无法连接到数据库。

1-我检查了数据库用户凭据,与之前的版本(MySQL 5.7)相同。连接上的 SSL 已禁用
2-检查了flyway 4.0.3和MySQL 8.0.17之间的兼容性,根据flyway文档是兼容的

阅读有关此问题的论坛和讨论,我几乎确信这是 MySQL 配置(文件 my.ini)问题,但是,我没有找到任何可以应用的提示或修复。

*************** Error ********************
Mon Aug 12 09:08:28 EDT 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. ERROR: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost:3306/database_name) for user 'xyz_user': Could not create connection to database server.

最佳答案

我通过查找我的 Flyway url 字符串并向其附加 useSSL=false 在 Flask 应用程序中修复了此问题。

FLYWAY_URL=jdbc:mysql://{}:3306/{}?useSSL=false

关于mysql - Flyway 4.0.3 无法连接到 MySQL 服务器 8.0.17,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57462243/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com