List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:May 7 2001 1:35am
Subject:Re: users and passwords...users and passwords...
View as plain text  
At 12:16 PM -0700 5/6/01, Simon Chan wrote:
>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

That creates a UNIX user account, not a MySQL user account.  They have nothing
to do with each other.

To create a MySQL user (and set the password), use the GRANT statement
in the mysql program:

	% mysql -p -u root mysql

Then enter the MySQL root user password when prompted and execute your
GRANT statements.  See the MySQL Reference Manual for GRANT syntax.

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


-- 
Paul DuBois, paul@stripped
Thread
users and passwords...users and passwords...Simon Chan6 May
  • Re: users and passwords...users and passwords...Zak Greant6 May
  • Re: users and passwords...users and passwords...Paul DuBois7 May
    • RE: users and passwords...users and passwords...Daniel Goldin \(E-mail\)7 May
      • Re: users and passwords...users and passwords...Mark Rowlands21 May