For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > July 2007 > connect a database in remote server (can connect to the server via SSH)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author connect a database in remote server (can connect to the server via SSH)
zhangxiaoyu912@gmail.com

2007-07-17, 6:59 pm

Hi, All:
I am a new to perl. My perl code need to connect to the database in
the remote server, and I can login that server via SSH. Can anyone
give me a hint about how can I do that? Many thanks.

Tom Phoenix

2007-07-17, 6:59 pm

On 7/17/07, zhangxiaoyu912@gmail.com <zhangxiaoyu912@gmail.com> wrote:

> I am a new to perl. My perl code need to connect to the database in
> the remote server, and I can login that server via SSH. Can anyone
> give me a hint about how can I do that? Many thanks.


Have you seen what's on CPAN?

http://search.cpan.org/search?query=ssh&mode=all

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training
Francisco Valladolid

2007-07-17, 6:59 pm

Hi.

You must check if the Database ports are open, if no ask to the admin.

Regards

On 7/17/07, Tom Phoenix <rootbeer@redcat.com> wrote:
>
> On 7/17/07, zhangxiaoyu912@gmail.com <zhangxiaoyu912@gmail.com> wrote:
>
>
> Have you seen what's on CPAN?
>
> http://search.cpan.org/search?query=ssh&mode=all
>
> Good luck with it!
>
> --Tom Phoenix
> Stonehenge Perl Training
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>



--
Francisco Valladolid H.
-- http://bsdguy.net - Perl, [Open-Net] BSD fan. --

Jeff Pang

2007-07-17, 9:58 pm


--- zhangxiaoyu912@gmail.com wrote:

> Hi, All:
> I am a new to perl. My perl code need to connect to
> the database in
> the remote server, and I can login that server via
> SSH. Can anyone
> give me a hint about how can I do that? Many thanks.
>


You may use perl's database operation module DBI.pm,if
you're doing database programming rather than db
administration.




________________________________________
________________________________________
____
Don't get soaked. Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather
Chas Owens

2007-07-17, 9:58 pm

On 7/17/07, zhangxiaoyu912@gmail.com <zhangxiaoyu912@gmail.com> wrote:
> Hi, All:
> I am a new to perl. My perl code need to connect to the database in
> the remote server, and I can login that server via SSH. Can anyone
> give me a hint about how can I do that? Many thanks.


To answer accurately we need some more information first:

1. What brand of database is it: Informix, Oracle, DB2, PostgreSQL,
MySQL, SQL Server, etc. (I assume it is an RDBMS rather than a flat
file or hierarchal database)?
2. Does the database only accept local connections? (do you you really
have to ssh to the box to connect to it?)
3. What OS is the client?
4. What OS is the server?
5. What control do you have over the remote machine?

In most cases you can simply install the DBI module and a DBD module
that corresponds to your RDBMS. If some reason you can only connect
to the remote box through SSH you can still setup an ssh-tunnel and
connect to the RDBMS with the DBI that way.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com