PhpMyAdmin connect to MySQL server over SSL

I may be barking the wrong tree ... However, I have a MySQL server that only accepts connections from a client with a valid SSL certificate (see this link ). This works great with Rails, for example. I have my database on the same server and a Rails application that connects using a client certificate. Maybe not the fastest, but it works.

The configuration in database.yml looks like this:

sslkey: /path/to/client-key.pem
sslcert: /path/to/client-cert.pem
sslca: /path/to/ca-cert.pem

      

The problem is I want to host phpMyAdmin on the same server as the Rails application. I think phpMyAdmin is just more limited in its connection options because I can't find a way to use the client certificate to connect. But what I found odd was that Google for answers hadn't had much of an impact on this topic (which makes me wonder if I'm taking the wrong approach on this).

Obviously I can easily configure phpMyAdmin to host behind an SSL certificate (which will encrypt requests between the client browser and my phpMyAdmin server), but I also want the phpMyAdmin โ†” db connection to be encrypted.

Is it possible? Is this a bad design choice? Are there any better ways to do this?

Thank,

+1


source to share


1 answer


c config.inc.php

add this line after the relevant server stuff:

$cfg['Servers'][$i]['ssl']=true;  

      



Assuming your php and its mysql client are configured using SSL, this should work.

+4


source







All Articles