For some reason, MySQL treats "localhost" as a special case (at least that seems to be the behavior." If you run grant <list of rights> on <database.*> to user@'%' identified by 'password'; will allow login from anywhere but the localhost. That account must be created seperately.
Curtis John Almberg said: > Yes.... I was already pretty sure it was a rights issue. What I'm trying > to do is modify the rights for a particular user so I can log in > remotely. The question is what I should use for the host fields in the > various tables so that I can log in remotely *and* the web server can > log in through localhost. > > Problem is, everything I try blocks access from everywhere, even when I > use '%'. I did some more reading last night and figured out that it has > something to do with the sorting done in the first connection phase. I > think just changing the host field to '%' or '%.optonline.net' actually > lowers that user account below one of the default accounts (one with a > blank in the User field), so that I'm logging in on the other account. > > I'm sure there's a logic behind this set up, so I'm not changing it > haphazardly, but the logic escapes me at the moment! > > -- John > > ------------------------------------------------ > Identry, LLC > Northport, NY 11768 > > Ph: 631.754.8440 > Fx: 631.980.4262 > Em: [EMAIL PROTECTED] > > Member: ASDA, APS, ANA, Ephemera Society > of America, Long Island Web Developers Guild > > <><><><><><><><><><><><><><><><><><><><><><><><> > Visit us at: www.identry.com > Building You A Better Online Business > <><><><><><><><><><><><><><><><><><><><><><><><> > > > > > > -----Original Message----- > From: Curtis Maurand [mailto:[EMAIL PROTECTED] > Sent: Friday, November 07, 2003 1:44 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: remote connection > > > Its a permissions thing on the server end. You have to have set up a > user > account on the server. Very important are hostnames. > > Curtis > > John Almberg said: >> I'm trying to set up a remote connection to a mysql database using > Perl >> DBI. I have done this without problem on another database. I suspect > the >> rights are set up differently on this one. I have root access. >> >> When I try to connect, I get the following error (hostname, username, >> password have been edited for the purpose of this email): >> >> DBI connect('database:host','user','password') failed: Host >> 'ool-182f1a5f.dyn.optonline.net' is not allowed to connect to this > MySQL >> server at D:\My Documents\Identry Shared\Operations\Stamp Center -- >> website\database\update_inv.pl line 7 >> >> After reading section 4.2.8 in the manual (Connecting to the MySQL >> Server), I am pretty sure this is a rights problem. The user I am > trying >> to connect as has 'localhost' set in the Host field of both the 'user' >> and 'db' tables. There are no entries whatsoever in the 'host' table. >> >> What I want to do is to add the ability for my Perl program to connect >> as a certain user (call him 'bob') from a certain IP address. >> Unfortunately, all my attempts result block access from every host, > even >> localhost. Thus, even the webserver can't access the database. >> >> In desperation, I've even tried using '%' in the Host fields of both >> user & db tables. This doesn't work, either, so I'm obviously missing >> something. >> >> Any help much appreciated! >> >> Brgds: John >> >> ------------------------------------------------ >> Identry, LLC >> Northport, NY 11768 >> >> Ph: 631.754.8440 >> Fx: 631.980.4262 >> Em: [EMAIL PROTECTED] >> >> Member: ASDA, APS, ANA, Ephemera Society >> of America, Long Island Web Developers Guild >> >> <><><><><><><><><><><><><><><><><><><><><><><><> >> Visit us at: www.identry.com >> Building You A Better Online Business >> <><><><><><><><><><><><><><><><><><><><><><><><> >> >> >> >> >> >> >> >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]