mySQL question

Keller, Tim Tim.Keller at stratus.com
Wed Dec 4 16:42:46 EST 2002


Mike,

Sounds like you need to create a user on the mysql side with a password and
change the mysql_qconnect to 

mysql_connect("localhost","eventsuser","wookie");

You'll first have to run (as mysql root user)

grant ALL PRIVILEGES on events.* to eventsuser identified by "wookie";

then see how things go...

Tim.

-----Original Message-----
From: Derek Atkins [mailto:warlord at MIT.EDU]
Sent: Wednesday, December 04, 2002 16:33 PM
To: mvolmar at fruitlands.org
Cc: discuss at blu.org
Subject: Re: mySQL question


Perhaps your web server is not running as root, then, and this is a
permissions problem?

-derek

"Mike Volmar" <mvolmar at fruitlands.org> writes:

> I can run 'select * from events' from the mysql> proimpt just fine, but
only
> when logged in as the root linux user.
> 
> 
> -----Original Message-----
> From: Derek Atkins [mailto:warlord at MIT.EDU]
> Sent: Wednesday, December 04, 2002 4:09 PM
> To: Mike Volmar
> Cc: discuss at blu.org
> Subject: Re: mySQL question
> 
> 
> Perhaps '$result' contains an error (because mysql_query() returned
> an error)?  Can you run this query by hand against your MySQL DB on
> Linux?
> 
> -derek
> 
> "Mike Volmar" <mvolmar at fruitlands.org> writes:
> 
> >   mysql_select_db("events");
> >   $query = "select * from events";
> >   $result = mysql_query($query);
> >
> >   $num_results = mysql_num_rows($result);  // this line throws error
> 
> --
>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>        Member, MIT Student Information Processing Board  (SIPB)
>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>        warlord at MIT.EDU                        PGP key available
> 

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available
_______________________________________________
Discuss mailing list
Discuss at blu.org
http://www.blu.org/mailman/listinfo/discuss



More information about the Discuss mailing list