我们正在使用 DBI 从 Perl 连接到 mysql 数据库。连接字符串的 dns 为
$dsn = "DBI:mysql:database=test;host=myhost.portal.com;port=3306;";
。但这种连接是使用明文建立的。我们想要加密连接。
我们必须传递哪个参数来确保应用程序和 mysql 之间的连接是加密的或安全的?
我检查了一下,有
mysql_ssl
参数,但不确定,这是否加密了数据库连接。
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.