Use
    \u mysql;
to select the database

In the query:
    insert into user (host, user, password) values
    ('localhost', 'myname' password('testpass');
you are missing a bracket after ...('testpass')

--zak

----- Original Message -----
From: "Simon Chan" <[EMAIL PROTECTED]>
To: "mysql Mail List" <[EMAIL PROTECTED]>
Sent: Sunday, May 06, 2001 1:16 PM
Subject: users and passwords...users and passwords...


> NEWBIE QUESTION
> Hello,
>
> Just installed mysql on a solaris2.7 sparc machine, but I don't seem to
have permission to do
> anything!  I add a user by typing
>
> useradd username
>
> BUT HOW DO I SET THE PASSWORD?  Someone suggested doing this:
>
> mysql>insert into user (host, user, password) values ('localhost',
'myname' password('testpass');
>
>
> But that doesn't work for me!  It gives me the good ol' syntax error
message.  I've also tried
> this:
>
> mysql> insert into user (host, user, password) values ('localhost',
'myname','testpass');
>
>
> But that gives a message saying that no database selected.
>
> Help!
>
> thanks everybody.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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