MySQL Forums
Forum List  »  Perl

Error 10061: connect to MySQL server failed
Posted by: Jess McKenzie
Date: April 04, 2011 08:58AM

I hope this is a good place to ask about this------
Trying to install active perl to use with MySQL 5.5.9. Perl looks good--at least the 'hello world' script works.
Not so with the script to test the connect. Script lines 3 and 4 are:

$dbh = DBI->connect('dbi:mysql:perltest','root','password')
or die "Connection Error: $DBI::errstr\n";

When I run the script C:\perlscripts\my-sql-test.pl from its folder, I see:

DBI connect('perltest', 'root', ...) failed: Can't connect to MySQL server on 'localhost' (1006) at C:\perlscripts\my-sql-test.pl line 3

This seems to be a prevalent problem, but I've seen no remedy that works for me. Suspecting "pilot error" here, but I can't see it. BTW, I'm following the About.com tutorial and its CREATE and perl scripts:
http://perl.about.com/od/perltutorials/a/perlmysql.htm
Any advice before I give up?
thanks...~jess

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.