I may be barking up the wrong tree... However, what I have is a MySQL server that only accepts connections from clients with valid SSL certificates (see this link). This works great for Rails, for example. My database is on a server and I have a Rails application that connects using a client certificate. Maybe not the fastest, but it works.
The configuration indatabase.yml is as follows:
sslkey: /path/to/client-key.pem sslcert: /path/to/client-cert.pem sslca: /path/to/ca-cert.pem
The problem is that I want to host phpMyAdmin on the same server as the Rails application. I think phpMyAdmin is more limited in its connection options since I can't seem to find a way for it to connect using a client certificate. But I find it strange that googling doesn't turn up many answers on this question (which makes me wonder if I'm taking the wrong approach).
Obviously I could easily set up phpMyAdmin itself to be hosted behind an SSL certificate (which would encrypt requests between the client browser and my phpMyAdmin server), but I would like the phpMyAdmin <-> database connection to also is encrypted. < /p>
is it possible? Is this a bad design choice? Is there a better way?
I believe the fully comprehensive answer is well explained in the PHPmyadmin documentation: https://docs.phpmyadmin.net/en/latest/ config.html#example-google-ssl
You should follow it to configure your server connection records in config.inc.php as follows:
In your
config.inc.php
, add this line after the applicable server content:Assuming your php and its mysql client are configured with SSL, this should work.