Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Problem connecting with SSL to mySQL database

by dorko (Prior)
on Apr 11, 2019 at 00:30 UTC ( #1232432=note: print w/replies, xml ) Need Help??


in reply to Re^2: Problem connecting with SSL to mySQL database
in thread Problem connecting with SSL to mySQL database

I think clueless newbie isn't as clueless s/he contends. Let's see if there is something enabled by default. Let's compare the two $conn data structures. Try something like this (untested):

#!/shebang_goes_here use warnings; use strict; use Data::Dumper; use DBI; my $user = 'charrison'; my $pass = '********'; my $conn = 'DBI:mysql:database=dwcontact;host=192.168.200.39;port=3402 +;mysql_ssl=1'; print Dumper ($conn); my $dbh = DBI->connect($conn, $user, $pass);

Perhaps mysql_ssl_ca_file or mysql_ssl_ca_path are getting defined in a way we don't understand.

Cheers,

Brent

-- Yeah, I'm a Delt.

Replies are listed 'Best First'.
Re^4: Problem connecting with SSL to mySQL database
by ibm1620 (Monk) on Apr 11, 2019 at 13:39 UTC
    Hmm..

    $conn's just a string, in either case. (Dumper confirms this.)

      You're absolutely right. Try Dumper-ing $dbh after the successful connection - there might be a setting in there for mysql_ssl_ca_file, mysql_ssl_ca_path or mysql_ssl_verify_server_cert.

      ("mysql_ssl_verify_server_cert = 0" sounds promising.)

      Cheers,

      Brent

      -- Yeah, I'm a Delt.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1232432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2020-05-25 08:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (144 votes). Check out past polls.

    Notices?