Help - Search - Members - Calendar
Full Version: Perl and Myql using DBI
The Planet Forums > Control Panels > Plesk
dennism220
Hey gang,

I have a client that is trying to install a perl script that accesses Mysql and is having some trouble. He is asking:

What is the exact connect string that perl can use to programmatically manipulate a MySQL database?

For example:

("DBI:mysql:database_name:localhost","database_owner","");

This is a Plesk 5 install. (Waiting for my Plesk 6 Key.)

Thanks,

Den
binasys
Looks good, mine is:

$sql = DBI->connect("DBI:mysql:$dbname:localhost","$dbuser","$dbpass");

Obviously you need the perl mysql modules installed.
dennism220
I looked at Perl Diver and the following modules are installed:

Mysql, Mysql::statement, and a bunch of DBI's. Are there others I should be looking for?

Also (I should have posted this initially), this is the error they are getting:

QUOTE
Software error:

DBI->connect(arp:localhost) failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2) at arp3-data.pl line 32

For help, please send mail to the webmaster,
giving this error message and the time and date of the error.

Content-type: text/html


Software error:

[Fri Jun 20 16:02:50 2003] arp3-install.pl: DBI->connect(arp:localhost)
failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
(2) at arp3-data.pl line 32

Thanks again,
Den
binasys
I believe you are missing DBD::mysql
dennism220
QUOTE
Originally posted by binasys
I believe you are missing DBD::mysql

Nope, its there. icon_smile.gif

Den
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.