Using Perl DBI to access my MySQL database

asked Dec 28, 2012 in Database by Susan3 (880 points)
Hi there

I am using Linux server for MySQL and I want to connect to MySQL database using Perl.
can anyone please advice mw how to do this?

1 Answer

0 like 0 dislike
answered Dec 28, 2012 by lionhost (4,060 points)
To access MySQL database with Perl, you should use the DBI module .
1.After Log into your Linux web server using Secure Shell, type in the following at the prompt in order to include the DBI module in the script:
use DBI;
2.To connect to your database, type the following connection string:
$your-username, $your-password);