----- Original Message -----
From: "Kevin Donnelly" <[EMAIL PROTECTED]>
To: "josep" <[EMAIL PROTECTED]>
Sent: Tuesday, December 11, 2001 11:27 AM
Subject: Re: PHP+MYSQL: unable to select database


> Hi Josep
>
> > It is a php guestbook (called phpBook) with mysql downloaded from
> > www.netone.at
>
> OK - I've had a look at their install file.
>
> > > * creating a db: mysqladmin -uroot -p create
> > > "mydatabase";
> >
> > I've done instead (as of phpBook documentation tells):
> >
> > # mysqladmin -u jupshoes -pjupshoes -p create phpbook
> > Database "phpbook" created.
> > (before I've added the user jupshoes in the mysql.user table with
> > create_priv)
>
> OK.  Can I suggest that you take things one step at a time here?  Instead
of
> using your new user jupshoes, just use the root one, then you can move on
> from that afterwards.  If you were able to create user jupshoes, then that
> means you must have MySQL root privileges at least within your FTP area.
> This is the way that MySQL is usually set up on a hoster, although you may
> need to use your FTP username instead of the name "root".
>
> So I would delete the db phpbook (log into mysql, and then: drop database
> phpbook).
>
> Then use the line I gave you to recreate the db, using your FTP username
if
> "root" is not appropriate.
>
> > > * logging onto MySQL and populating the database from the supplied
> > > script: mysql -uroot -p mydatabase < /path/to/database.sql.
> >
> > NOW!!! (via telnet as jupshoes)
> >
> > # mysql -ujupshoes -p phpbook<MYPATH/phpBook.sql
> > Enter password:         (I've do it)
> > ERROR 1050 at line 11: Table 'badwords' already exists
>
> This error is because you previously tried to create the db, and it has an
> entry for the table.  Deleting the db and recreating it will get around
this
> (although you could also just delete the table:-)).
>
> Then try the line I gave you again, but again using root/FTPuser instead
of
> jupshoes.
>
> > Comments:
> > * after all phpbook isn't in the mysql.db file (It doesn't appear when
> > doing SELECT* FROM mysql.db)
>
> Not all dbs will appear in this table.  I THINK only dbs that have been
set
> up to allow access by users other than root appear here.
>
> > * should the jupshoes user have any other privs in the mysql users table
> > (now only has create priv)
>
> Yes, eventually.  But I strongly suggest taking things one step at a time.
> Get it set up by root first, and show that it is working, and then set up
the
> user jupshoes, and get it working with him.  That way, you can track down
> problems easier.  It may seem slower, but believe me, it's faster!
>
> The phpBook install file also says you could run install.php to do this
all
> automatically.  Since you've started with the manual route, though,
perhaps
> you should stick to it.  Just remember that in any case install.php must
be
> deleted from the live site.
>
> > * Should I reply messages to people helping me or to the mailing list?
>
> You should reply to the mailing list normally.  However, no-one had
answered
> your question, and I don't visit the list regularly, so I thought if you
> re-posted with difficulties I might not see them.  Hence the suggestion
you
> contact me direct.  It's usual, though, even if you do things offline, to
> repost the topic with SOLVED in the subject line if you get things
working,
> so that others may be helped if they have a similar problem.
>
> You're welcome to copy this to the list if you want.
>
> Best wishes
>
> Kevin
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to