I may be barking up the wrong tree... However, what I have is a MySQL server that accepts connections only from a client with a valid SSL cert (see this link). This works great for example with Rails. I have my database on one server, and a Rails app that connects using the client certificate. Maybe not the fastest, but it works.
The configuration in database.yml looks something like this:
sslkey: /path/to/client-key.pem
sslcert: /path/to/client-cert.pem
sslca: /path/to/ca-cert.pem
The problem is that I'd like to host phpMyAdmin on the same server as the Rails app. I think that phpMyAdmin is simply more limited in its connection options because I can't seem to find a way for it to use a client certificate to connect. But what I found odd was that Googling for answers didn't turn up much on this subject (which makes me wonder if I'm taking the wrong approach to this).
Obviously, I can easily set up phpMyAdmin itself to be hosted behind an SSL certificate (which will encrypt requests between the client browser and my phpMyAdmin server) but I want the phpMyAdmin <-> db connection to be encrypted as well.
Is this possible? Is this a bad design choice? Are there better ways to do this?
in your config.inc.php
add this line after applicable server stuff:
$cfg['Servers'][$i]['ssl']=true;
Assuming your php and its mysql client is configured with SSL in mind this should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With