最近,我设置了一个新的AWS服务器,作为一些小型实用程序的web服务器。它正在运行Windows 2012。然后我:
我尝试使用特定于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相关的选项,并且不允许我手动修改连接字符串。我也不知道如何修改MySQL的设置,因为我似乎找不到my.ini文件了。
上一次安装服务器是使用MySQL 5.7,从头到尾都没有问题,所以我假设这一定是MySQL 5.8+问题,但这与错误消息相矛盾。
更新
最后,我决定卸载MySQL 8并安装MySQL 5.7。很难下载5.7的安装程序(由于某些原因,我第一次获得了8),然后与MySQL安装程序发生了冲突,不想识别我下载的5.7,但是在完成了它之后,Lucee立即开始连接,没有问题。
不过,我仍然会对解决方案感兴趣,这样以后我就可以使用MySQL 8了。
发布于 2018-07-19 06:54:27
您可以尝试在Application.cfc中定义数据源,这将使您更好地控制连接参数。例如:
this.datasource = {
database: "mydatabase"
,type: "mysql"
,host: "hostname"
,port: 3306
,username: "myusername"
,password: "encryptedpassword"
,custom: {
useSSL: false
,useUnicode: true
,characterEncoding: "UTF-8"
}
};https://stackoverflow.com/questions/51410149
复制相似问题