Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14318 reviews 1707 hosting providers

Questions & Answers

Using Perl DBI to access my MySQL database

Dec 29, 2012 by Susan3
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 votes
Dec 29, 2012 by lionhost
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);