|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I would like to encrypt data passed between my web server and the
database server. I have looked all over, but don't see any information on how to connect to mysql via ssh with php. Is it possible? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Sep 12, 4:00 pm, mtuller <mitul...@gmail.com> wrote:
> I would like to encrypt data passed between my web server and the > database server. I have looked all over, but don't see any information > on how to connect to mysql via ssh with php. Is it possible? You want to use SSH tunneling to do this. Basically, suppose PHP is running on hostA and MySQL is running on hostB. You then SSH from hostA to hostB like this: ssh -L 3306:hostB:3306 hostB What this says is "From hostA ssh to hostB. When you do that, make port 3306 on hostA forward everything over to port 3306 on hostB." Finally you tell PHP to connect to use localhost (hostA) as it's database server and it should just magically work. You can even set up the SSH connection on a different machine. So, from hostC you would do: ssh -L *:3306:hostB:3306 hostB And then configure PHP to use hostC as it's database server. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Wed, 12 Sep 2007 20:00:33 -0000, mtuller <mituller@gmail.com> wrote:
>I would like to encrypt data passed between my web server and the >database server. How about: http://www.php.net/manual/en/function.mysql-connect.php client_flags, MYSQL_CLIENT_SSL >I have looked all over, but don't see any information >on how to connect to mysql via ssh Well, you could set up an SSH tunnel for the relevant port (3306, using the -D flag, or use stunnel or something else like that) and run the standard (unencrypted) MySQL protocol through the encrypted tunnel, but that's another step on top of just using the built-in SSL support (assuming a non-ancient version of MySQL, and that it works as advertised anyway). -- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
mtuller wrote:
> I would like to encrypt data passed between my web server and the > database server. I have looked all over, but don't see any information > on how to connect to mysql via ssh with php. Is it possible? > Try a MySQL newsgroup, such as comp.databases.mysql. MySQL has to be set up for this communication. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
I am not trying to connect via SSL, I want to tunnel through SSH.
On Sep 12, 10:26 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: > mtuller wrote: > > I would like to encrypt data passed between my web server and the > > database server. I have looked all over, but don't see any information > > on how to connect to mysql via ssh with php. Is it possible? > > Try a MySQL newsgroup, such as comp.databases.mysql. MySQL has to be > set up for this communication. > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstuck...@attglobal.net > ================== |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
mtuller wrote:
> I am not trying to connect via SSL, I want to tunnel through SSH. > > On Sep 12, 10:26 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote: >> mtuller wrote: >>> I would like to encrypt data passed between my web server and the >>> database server. I have looked all over, but don't see any information >>> on how to connect to mysql via ssh with php. Is it possible? >> Try a MySQL newsgroup, such as comp.databases.mysql. MySQL has to be >> set up for this communication. >> >> -- >> ================== >> Remove the "x" from my email address >> Jerry Stuckle >> JDS Computer Training Corp. >> jstuck...@attglobal.net >> ================== > > You still need to be in a MySQL newsgroup. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
![]() |
| Outils de la discussion | |
|
|