How to connect MySQL Database from Perl?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    How to connect MySQL Database from Perl?

    Hello All,

    In order to connect MySQL database with Perl script one need to use below mentioned sample script:

    #!/usr/bin/perl

    use DC;

    $db = DC->connect("dbi:mysql:<database>","<username>","<pas sword>")
    or die("Couldn't connect");

    $db->disconnect;

    Thanks,

    Shane G.
    AccuWebHosting.Com
Working...
X