in reply to Remote connection to mysql

If you want to do something simple with mySQL, you might want to consider using Net::MySQL module. Here is a snippet from my (working) code:
use Net::MySQL; my $mysql = Net::MySQL->new( hostname => 'localhost', database => 'mytestdb', user => 'mysql', password => 'mysql' ); ... my $SQL = "select * from table1 where field1 = 1"; $mysql->query($SQL);

Hope this helps :)

--------------------------------
An idea is not responsible for the people who believe in it...

Replies are listed 'Best First'.
Re^2: Remote connection to mysql
by BUU (Prior) on Apr 23, 2005 at 20:16 UTC
    Why on earth would you want to use this 'Net::Mysql' instead of the extremely well tested, perfectly working, standard module DBI?
      Umm... simply because I was first introduced to Net::MySQL and noone has pointed me towards DBI until now...

      Judging by the downvotes I got for my post, I guess it's time to fill the gap and familiarize myself with the standard way of doing things :)

      --------------------------------
      An idea is not responsible for the people who believe in it...