Re: script not able to connect
"Jeremy Morris" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 15 Aug 2004 14:12:00 +0200 Jan Eden <[email protected]> wrote: > Hi Jeremy, > > Jeremy Morris wrote on 14.08.2004: > >>I am quite new at using perl and mysql. I just installed >>the DBI and DBD packages, and was required to download >>the >>header files to do so. Once all these things were >>installed, I tried a simple script to see if it works. >> Here is the code I tried: >> >>#!/usr/bin/perl -w >>use strict; >>use DBI; (I also tried use DBD::mysql, same effect) >> >>my $dsn = 'dbi:mysql:databasename:myhostname:3306'; >>my $user = 'myusername'; >>my $pswd = 'mypassword'; >> >>my $dbh = DBI->connect($dsn,$user,$pswd) or die 'try >>again\n'; >> >>I get the follwing error message after running $> perl >>filename.pl : >>DBI >>connect('databasename:myhostname:3306','myusername','...) >>failed: Host 'myipaddress' is not allowed to connect to >>this MySQL server at filename.pl line 9 > > Did you set up the MySQL server yourself? Some ISPs >offer MySQL databases where access is restricted to their >own webservers. This is a good thing from a security >viewpoint, but in that case you have to connect to the >webserver via ssh and run your script directly from the >remote server. > > HTH, > > Jan > -- > Either this man is dead or my watch has stopped. - >Groucho Marx > > -- > MySQL Perl Mailing List >For list archives: http://lists.mysql.com/perl > To unsubscribe: > http://lists.mysql.com/[email protected] > Yes, I set up the server myself. I am working on my machine at home, so the server is local. I think what is wrong is that my Perl is set up with threading installed. Do you know how to turn that off? Jeremy http://www.math.utah.edu/~c-msjd/ -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]