使用DBExpress通过SSL连接到MySQL
我想通过SSL连接到MySQL服务器。更具体地说,我想用DbExpress实现这一点 我过去曾使用SSL通过MySQL。这非常有效,但Zeos不允许我运行返回多个resultset的存储过程,这是本项目的一个障碍 使用Zeos,我曾经设置过如下SSL连接:使用DBExpress通过SSL连接到MySQL,mysql,delphi,ssl,dbexpress,dbx,Mysql,Delphi,Ssl,Dbexpress,Dbx,我想通过SSL连接到MySQL服务器。更具体地说,我想用DbExpress实现这一点 我过去曾使用SSL通过MySQL。这非常有效,但Zeos不允许我运行返回多个resultset的存储过程,这是本项目的一个障碍 使用Zeos,我曾经设置过如下SSL连接: Connection := TZConnection.Create(nil); Connection.Properties.Values['MYSQL_SSL'] := 'TRUE'; Connection.Propert
Connection := TZConnection.Create(nil);
Connection.Properties.Values['MYSQL_SSL'] := 'TRUE';
Connection.Properties.Values['MYSQL_SSL_CA'] := 'c:/pathtocert/cert.pem';
Connection.Properties.Values['MYSQL_SSL_CERT'] := 'c:/pathtocert/foo.pem';
Connection.Properties.Values['MYSQL_SSL_KEY'] := 'c:/pathtocert/bar.pem';
我发现您可以使用DBX执行类似的操作:
Connection.Params.Values['drivername'] := 'MySQL';
Connection.Params.Values['compressed'] := 'True';
Connection.Params.Values['HostName'] := 'host';
Connection.Params.Values['Database'] := 'dbname';
Connection.Params.Values['user_name'] := 'me';
Connection.Params.Values['Password'] := '...';
Connection.Params.Values['encrypted'] := 'True'; // looks promising!
我知道您可以设置一个名为“encrypted”的参数,但我不知道如何配置证书的位置。LibMySQL.dll需要这些文件来设置其加密连接
因此,我的问题是: