Subject: Build SSL on Access Remote Database

From: "峰菖" <[email-masked]>
Date: Thu, 28 Mar 2002 03:23:44 +0800

Dear All:

 I use PHP to access remote MySQL database,
 and I wish build SSL on their connection.
My web server is Apache 1.3.23

I know programing,but I don't know how to begin.
Can anybody help me. Just tell me how to begin.
Thank a lot.

______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Nick Miles <[email-masked]>
Date: Thu, 28 Mar 2002 03:25:56 +0000

I think modssl is not really what you want, an SSL enabled web server wont do 
much for the PHP-MySQL connection.

Rather I think you'd want an SSL enabled MySQL, you can make then an SSL MySQL 
client and server but not sure how then PHP would make use of that...it might 
be easier to simply set up a secure tunnel to the remote server if you have SSH 
on the server, this would be simple to set up and simple to program for.

http://www.mysql.com/doc/S/e/Security.html
http://www.mysql.com/doc/S/e/Secure_connections.html

Didnt personally try compiling an SSL MySQL, but should be "fairly" straight 
forward.  To set up a tunnel get an SSH client and activate port forwarding 
from the server:3306 to whatever local port you wish to run that MySQL session 
on.  By doing this you can also disable the external MySQL accounts (e.g. 
root@%) as it uses the SSH session, therefore you could even block off port 
3306 to the outside.

Nick

---

From: Mikael Pettersson <[email-masked]>
Date: Thu, 28 Mar 2002 08:38:17 +0100

Check this article :
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html

They are using
*Apache
*mod_ssl
*openssl
*php
*mysql

/Micke

---

From: Nick Miles <[email-masked]>
Date: Thu, 28 Mar 2002 12:50:17 +0000

Certainly a useful article.  But I should point out this doesnt deal with PHP-
MySQL encryption, only on the User-Apache end.  See image:
 http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page4.html

What the other man was hoping to do (if I understood) was use a remote MySQL 
database to where he hosts the site, and from PHP access it securely.  
Therefore a secure tunnel will help on this side.

Obviously it should be said that no matter what this set up would be more 
dangerous than having a MySQL server behind the firewall where the apache/php 
server is hosted, also would be terribly slow.

Suggestion to get around this might be to use a secure tunnel and replicate 
data locally, if it doesnt need to be live at the other end that is.

Nick