CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
mysql and perl


New User

May 11, 2009, 10:52 AM

Post #1 of 2 (3351 views)
mysql and perl Can't Post

   From the beginning. My website host is Hypermart.I am trying to install a classifieds script with MYSQL from The index.cgi uses 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',...) 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 = ''

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

$db = DBI->connect('','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

( No such file or directory

am really new to this and need some help

Veteran / Moderator

May 11, 2009, 11:00 AM

Post #2 of 2 (3350 views)
Re: [padutch] mysql and perl [In reply to] Can't Post

See my answer in your duplicate question at


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives