Home: Perl Programming Help: DBI:
mysql and perl

New User

May 11, 2009, 10:52 AM

Views: 5101
mysql and perl

   From the beginning. My website host is Hypermart.I am trying to install a classifieds script with MYSQL from Fuzzymonkey.com. The index.cgi uses sitevariables.pm for all paths and anything else it needs. The problem is that the script cannot find MYSQL.The scripts has the following snippit to call the MYSQL

if ($dbh = DBI->connect("dbi:mysql:$svb::mysqldb","$svb::mysqluser","$svb::mysqlpass")) here is the error I get

[Mon May 4 07:53:12 2009] index.cgi: DBI connect('rlw.hypermartmysql.com','rlw',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/users/web/b1263/hy.rlw/cgi-bin/class/index.cgi line 39

here are the settings for this line of code

our $mysqluser = 'rlw';
our $mysqlpass = 'deadly';
our $mysqldb = 'rlw.hypermartmysql.com'

when I am in MYSQL and have it generate a code it gives me the following

$db = DBI->connect('dbi:mysql:rlw:rlw.hypermartmysql.com:3306','rlw','deadly') or die('Couldnot connect');

I replaced the privious code with this changing $db to dbh and had a syntax error that I fixed and now I get

(https://protected.hypermart.net/rlw/cgi-bin/class/template.html): No such file or directory

am really new to this and need some help

Veteran / Moderator

May 11, 2009, 11:00 AM

Views: 5100
Re: [padutch] mysql and perl

See my answer in your duplicate question at http://codingforums.com/showthread.php?t=166044