Streen has asked for the wisdom of the Perl Monks concerning the following question:

Hello, After having several problems installing the DBI and the DBD:MySql Modules, I finally succeded. Now I would like to write a Perlutility which connects to a MySql Database in the Web, I wrote a small test program:
my $dbhost = "legendenwelt.de"; my $dbuser = "USER"; my $dbpass = "XXXXX"; my $dbname = "DBASE"; # Connect to the database. my $dbh = DBI->connect("DBI:mysql:database=$dbname;host=$dbhost", $dbuser, $dbpass, {'RaiseError' => 1});
But Now an Error occures at the connect:
DBI connect('database=DBASE;host=legendenwelt.de','USER',...) failed: Can't connect to MySQL server on 'legendenwelt.de' (10060) at H:\work\Tracking System\TestProgram.pl line 26
I have no clue what is wrong so I hope some of you may help me, Thanks a lot, Streen

Replies are listed 'Best First'.
Re: Connecting to an external Mysql Database
by Skeeve (Parson) on Oct 05, 2005 at 07:14 UTC
    Provided your connection information is correct, this could be an issue of:
    • missing permissins for your host on the database
    • missing permissions on your firewall
    • missing permissions on the database's firewall
    • ... maybe others have more ideas what else could go wrong

    $\=~s;s*.*;q^|D9JYJ^^qq^\//\\\///^;ex;print
Re: Connecting to an external Mysql Database
by mrkoffee (Scribe) on Oct 05, 2005 at 07:24 UTC
    It looks like you're connecting from some flavor of Windows. I saw this happen once when connecting from XP, and it was an issue with the XP firewall. If you're running that (or any other) firewall, make sure the port the MySQL server is running on (default=3306) is open.
Re: Connecting to an external Mysql Database
by Delusional (Beadle) on Oct 05, 2005 at 12:18 UTC
    Are you sure you can remote connect to the MySQL database on legendenwelt.de? The majority of providers do not allow remote connections to the database deamon. So you would need to upload the file, set the proper permissions, and run a script from the server verses your home or work computer.