Skip navigation links

MySQL Forums :: Perl :: Error 10061: connect to MySQL server failed


Advanced Search

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


Subject Written By Posted
Error 10061: connect to MySQL server failed Jess McKenzie 04/04/2011 08:58AM
Re: Error 10061: connect to MySQL server failed Randy Clamons 04/04/2011 12:41PM
Re: Error 10061: connect to MySQL server failed Jess McKenzie 04/04/2011 04:36PM
Re: Error 10061: connect to MySQL server failed Jess McKenzie 04/04/2011 04:56PM
Re: Error 10061: connect to MySQL server failed Jess McKenzie 04/04/2011 10:51PM
Re: Error 10061: connect to MySQL server failed Jess McKenzie 04/05/2011 01:58PM
Re: Error 10061: connect to MySQL server failed Doug Shuck 06/28/2011 05:42AM
Re: Error 10061: connect to MySQL server failed Rick James 07/10/2011 05:09PM
Re: Error 10061: connect to MySQL server failed Doug Shuck 07/10/2011 10:22PM


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.