fresh lucee 5.2.7.63安装无法连接到fresh mysql 8安装

ui7jx7zq  于 2021-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(309)

我最近安装了一个新的aws服务器,用作一些小型实用程序应用程序的web服务器。它运行的是windows 2012。我接着说:
已安装chrome
使用安装程序安装lucee 5.2.7.63
使用安装程序安装mysql 8.0.11社区版
已安装mysql workbench
通过mysql workbench创建了一个新的模式(可以很好地连接到mysql)
在lucee server administrator中创建了验证失败的数据源:

Could not create connection to database server.

我尝试使用lucee特定的用户和根用户,但都不起作用。当我查看lucee错误日志时,我看到这种情况发生了好几次,每次尝试验证一次:

Wed Jul 18 19:52:08 UTC 2018 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.

我的猜测是,我要么需要强制lucee使用ssl,要么强制mysql允许非ssl连接。不幸的是,lucee管理员没有与ssl相关的选项,也不允许我手动修改connect字符串。我不确定如何更改mysql的设置,因为我似乎再也找不到my.ini文件了。
上一次我安装服务器是用MySQL5.7,从头到尾都没有问题,所以我假设这一定是MySQL5.8+的问题,但是错误消息与此相矛盾。
更新
最后我决定卸载mysql 8并安装mysql 5.7。很难下载5.7的安装程序(由于某种原因,我第一次又得到了8个),然后与mysql安装程序发生了冲突,他们不想识别我下载的5.7,但在完成安装后,lucee立即开始连接,没有任何问题。
不过,我仍然对一个解决方案感兴趣,以便将来可以使用mysql 8。

dddzy1tm

dddzy1tm1#

您可以尝试在application.cfc中定义数据源,这样可以更好地控制连接参数。例如:

this.datasource = {
 database: "mydatabase"
 ,type: "mysql"
 ,host: "hostname"
 ,port: 3306
 ,username: "myusername"
 ,password: "encryptedpassword"
 ,custom: {
   useSSL: false
   ,useUnicode: true
   ,characterEncoding: "UTF-8"
 }
};

相关问题