MySQL Forums
Forum List  »  PHP

Re: Can't for the life of me figure out how to do remote MySQL over SSL in PHP
Posted by: Triton Truello
Date: December 09, 2021 10:53PM

Yes, same result even when mysqli_options is commented out.

Yes, user with exact same credentials connects just fine remotely from command line. Even tested that it was using SSL by using the '--ssl-mode=DISABLED' option and it then refused my connection.

I have this problem posted in another programming forum and a user there suggested I change the mysql_ssl_set() to the following:

mysqli_ssl_set($con,'client-key.pem','client-cert.pem','ca.pem',null,null);

And now it seems like I'm getting closer. New error is:

Warning: mysqli_real_connect(): Peer certificate CN=`MySQL_Server_8.0.23_Auto_Generated_Server_Certificate' did not match expected CN=`myserverip' in /var/www/html/public_html/test.php on line 24

Any ideas on how to fix that?

Thanks so much for responding.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.