3
我想通过SSL连接到MySQL服务器。更具体地说,我想用DbExpress做到这一点。使用DBExpress通过SSL连接到MySQL
我以前通过ZeosLib使用过SSL。这很好,但Zeos不让我运行返回多个结果集的存储过程,这是该项目中的一个显示屏。
用的Zeos,我用来设置这样的SSL连接:
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需要这些才能设置其加密连接。
所以我的问题是:
- 不DBX让我建立加密引黄?
- 如果是这样,谁能告诉我该怎么做? :)