Showing results for 
Search instead for 
Did you mean: 

Magento 2 - Mysql connection through SSL

Magento 2 - Mysql connection through SSL

How can we make a database user for the Magento 2 setup connect with SSL?

Can we tell Magento 2 to use the ca and client certs/keys somewhere?


This is especially important when the database is remotely accessed.


So far, I found this through searching in google and the forums:

But it's a solution for Magento 1.


Thanks in advance.

Tags (3)

Re: Magento 2 - Mysql connection through SSL

Then I get prompted for my password, and if I enter it, I can connect. But I need to automate this connection, and appending the password to the line above is a bad idea (and never works anyway Plex Lucky Patcher Kodi - which I also wonder about). So how can I securely connect to the client in an automated way without hardcoding a password? When I generated the certificates following the instructions at the link above I got eight .pem documents, most of which I'm not using.

Re: Magento 2 - Mysql connection through SSL

The link above is meant for Magento 1 installations.


You create those pem files for the client and the server side.  (4 total)

You also should've been told to create CA keys, those can be used on both sides. (2 total)


So a total of 6 seems about right, you probably just created the CA keys twice, on both the client and server, instead of copying those over.