使用 dbi 加密 perl 和 mysql 的数据库连接

问题描述 投票:0回答:1

我们正在使用 DBI 从 Perl 连接到 mysql 数据库。连接字符串的 dns 为

$dsn = "DBI:mysql:database=test;host=myhost.portal.com;port=3306;";
。但这种连接是使用明文建立的。我们想要加密连接。

我们必须传递哪个参数来确保应用程序和 mysql 之间的连接是加密的或安全的?

我检查了一下,有

mysql_ssl
参数,但不确定,这是否加密了数据库连接。

perl dbi
1个回答
0
投票

docs似乎直接回答了这个问题:

mysql_ssl
    A true value turns on the CLIENT_SSL flag when connecting to 
    the  MySQL server and enforce SSL encryption. ... This means that
    your communication with the server will be encrypted.
© www.soinside.com 2019 - 2024. All rights reserved.