我有一个支持TLSv1.2的远程mysql实例,python连接正常。但是,除了TLSv1.0之外,我无法让Perl进行连接。
在具有OpenSSL版本OpenSSL 1.0.2k-fips
的CentOS 7上运行。
DBI->connect(
"mysql_ssl=1;" .
"mysql_ssl_client_key=/etc/client.key" .
"mysql_ssl_client_cert=/etc/client.crt" .
"mysql_ssl_ca_file=/etc/ca.crt",
'my_db',
'my_password',
{ RaiseError => 1, AutoCommit => 1 },
);
我已经升级了我认为是必需的两个模块:
Successfully installed IO-Socket-SSL-2.060 (upgraded from 1.94)
和
DBD::mysql is up to date. (4.048)
任何想法我还能缺少什么,数据库服务器和客户端都将TLSv1.2与Python挂钩,因此它一定是缺少的Perl模块或配置选项吗?
已安装模块的完整列表:
App::cpanminus - 1.7044
B::Hooks::EndOfScope - 0.21
CPAN::Meta - 2.150010
CPAN::Meta::Requirements - 2.140
CPAN::Meta::YAML - 0.018
Class::Data::Inheritable - 0.08
DBD::mysql - 4.048
DBI - 1.640
Date::Manip - 6.61
Devel::CheckLib - 1.13
Devel::GlobalDestruction - 0.14
Devel::StackTrace - 2.03
Dist::CheckConflicts - 0.11
Eval::Closure - 0.14
Exception::Class - 1.44
Expect - 1.35
ExtUtils::CBuilder - 0.280230
File::NFSLock - 1.27
IO::CaptureOutput - 1.1104
IO::Socket::SSL - 2.060
IO::Tty - 1.12
IPC::Cmd - 1.00
IPC::Run3 - 0.048
Importer - 0.025
JSON - 2.97001
JSON::PP - 2.97001
List::Util - 1.50
Locale::Maketext::Simple - 0.21
Log::Dispatch - 2.67
Log::Dispatch::FileRotate - 1.34
Log::Log4perl - 1.49
MRO::Compat - 0.13
Mock::Config - 0.03
Module::Build - 0.4224
Module::CoreList - 5.20180220
Module::Implementation - 0.09
Module::Load - 0.32
Module::Load::Conditional - 0.68
Module::Metadata - 1.000033
Module::Pluggable - 5.2
Module::Runtime - 0.016
Package::Stash - 0.37
Package::Stash::XS - 0.28
Params::Check - 0.38
Params::ValidationCompiler - 0.27
Path::Tiny - 0.104
Perl - 5.16.3
Perl::OSType - 1.010
Role::Tiny - 2.000006
Scope::Guard - 0.21
Specio - 0.42
Sub::Exporter::Progressive - 0.001013
Sub::Identify - 0.14
Sub::Info - 0.002
Sub::Quote - 2.005000
Sub::Uplevel - 0.2800
Sys::Syslog - 0.35
Term::Table - 0.012
Test2::Plugin::NoWarnings - 0.06
Test2::Suite - 0.000100
Test::Deep - 1.128
Test::Fatal - 0.014
Test::Harness - 3.41
Test::Inter - 1.06
Test::Needs - 0.002005
Test::Requires - 0.10
Test::Simple - 1.302125
Test::Warn - 0.32
Test::Without::Module - 0.20
Try::Tiny - 0.30
Variable::Magic - 0.62
namespace::autoclean - 0.28
namespace::clean - 0.27
version - 0.9918
答案 0 :(得分:1)
这里的问题是,尽管我正在连接到最新的远程MariaDB数据库,但我在客户端计算机上安装了mysql-community-client 5.6。我卸载了所有的mysql-community,并替换为最新的MariaDB-client
和MariaDB-compat
。