List:General Discussion« Previous MessageNext Message »
From:Jerry Preeper Date:July 26 1999 9:38pm
Subject:Re: can't access mysql from web - command link ok
View as plain text  
Here are the main snippets of code from my perl program with a bunch of
comments and stuff unrelated to mysql removed for brevity.  I am connecting
with a localhost and user (jerry) combination that had worked fine before (
I can do a show columns from the command line for the table and everything
seems fine) - I haven't changed this script (or others that don't work now)
since April and it was working before I noticed this problem within the
last few days.

#!/usr/local/bin/perl -w
use Mysql;             # this library required for Mysql
print "Content-type: text/html\n\n";
.. (snip)
some date calculations here
.. (snip)
$dbh = Mysql->Connect('localhost','jerry');  # connect to db
$schedule_table = "lajolla_1999";
.. (snip)
bunch of html page printing
.. (snip)
$sql_query  = "select date_format(date, '%M %d, %Y'),away,away_score,";
$sql_query .= "home,home_score,"; 
$sql_query .= "from $schedule_table ";
$sql_query .= "where date >=$lastweek and date <=$yesterday ";
$sql_query .= "order by date desc";  
$sql_r2 = $dbh->Query($sql_query);
while (@game_data = $sql_r2->FetchRow()) {
$date                    = $game_data[0];
$away                    = $game_data[1];
$away_score              = $game_data[2];
$home                    = $game_data[3];
$home_score              = $game_data[4]; 
.. (snip)
now print a bunch of the data above


Jerry




At 03:18 PM 7/26/99 -0600, Sasha Pachev wrote:
>Stuart D Jackson wrote:
>> 
>>         Might it have something to do with the fact that netscape (and
>> other browsers) like to do stuff (like ftp) as anonymous instead of a
>> regular user?
>> 
>> -Stuart
>
>No, netscape has no knowledge of MySQL, and can communicate with it only
>indirectly through web server applications, applets, and possibly
>plug-ins that know how to talk to MySQL. Netscape itself will never send
>the authentication info for MySQL connection.
>
>> 
>> On Mon, 26 Jul 1999, Jerry Preeper wrote:
>> 
>> > This seems weird but I just noticed that the mysql daemon wasn't
allowing a
>> > connection from the web browser with the error message "Access denied for
>> > user: '@localhost' to database..." in the error log.  However, when I run
>> > mysql mysql from the command line (or for any database) everything seems
>> > fine and I can run commands without a problem.  I tried restarting and
get
>> > the same problem.   I haven't changed any users or anything like that, in
>> > fact I hadn't even used it in a couple of weeks.  I just checked the
>> > version and I'm running Ver 9.27 Distrib 3.22.14b-gamma, for
>> > unknown-freebsd2.2.6 (i386) on FreeBSD 2.2.8-stable (and yes mysql has
been
>> > running since after we upgraded to 2.2.8-stable).  Anyone ever seen this
>> > and have any ideas on how to fix it.
>> >
>
>Can you post the code that give you this error. It seems to me that you
>are sending an empty string for the user parameter when connecting to
>MySQL.
>
>
>> > Jerry
>> >
>> >
>> > ---------------------------------------------------------------------
>> > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>> > posting. To request this thread, e-mail mysql-thread8428@stripped
>> >
>> > To unsubscribe, send a message to the address shown in the
>> > List-Unsubscribe header of this message. If you cannot see it,
>> > e-mail mysql-unsubscribe@stripped instead.
>> >
>> 
>> ---------------------------------------------------------------------
>> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>> posting. To request this thread, e-mail mysql-thread8433@stripped
>> 
>> To unsubscribe, send a message to the address shown in the
>> List-Unsubscribe header of this message. If you cannot see it,
>> e-mail mysql-unsubscribe@stripped instead.
>
>-- 
>Sasha Pachev
>http://www.sashanet.com/ (home)
>http://www.direct1.com/ (work)
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread8444@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail mysql-unsubscribe@stripped instead.
>
>
>
Thread
can't access mysql from web - command link okJerry Preeper27 Jul
  • Re: can't access mysql from web - command link okStuart D Jackson27 Jul
    • Re: can't access mysql from web - command link okSasha Pachev27 Jul
      • Re: can't access mysql from web - command link okJerry Preeper27 Jul
    • Re: can't access mysql from web - command link okJerry Preeper27 Jul
    • Re: can't access mysql from web - command link okSasha Pachev27 Jul
      • Re: can't access mysql from web - command link okJerry Preeper27 Jul
        • Re: can't access mysql from web - command link okThimble Smith27 Jul
Re: can't access mysql from web - command link okHunter Hillegas27 Jul
  • Re: can't access mysql from web - command link okChristian Mack27 Jul