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, [EMAIL PROTECTED]
---------------------------------------------------------------------
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