Why are you getting this message, "Access denied for user '@localhost' for database test2"? If you are logged on as 'emil' and you attempt to connect, if you are denied access you should receive a message like this; "Access denied for user 'emil@localhost' for database test2"
It would appear that you are not passing a user name to MySQL when you are trying to connect. If I were you, I would delete all users with either a null/blank user name or null/blank password from my "user" table. Then, I would flush priveleges. Then, I would try to connect as the user 'emil' (-u emil). These documents (links shown below) provide an OUTSTANDING explanation of users and privileges for MySQL. http://www.mysql.com/doc/C/o/Connection_access.html http://www.mysql.com/doc/R/e/Request_access.html http://www.mysql.com/doc/A/c/Access_denied.html I also highly recommend the book "MySQL" by Paul DuBois. It has been indispensable for me. Respectfully, Charles Q. At 05:44 AM 6/21/2002, you wrote: >if i could add to this question a bit: > >what are the steps in adding a user that will have access to only one >database? > >i've tried using both: > >GRANT SELECT, INSERT, UPDATE, DELETE, ALTER ON uview.* TO user@% >IDENTIFIED BY "password"; (then did a FLUSH PRIVILEGES) > >and i've tried adding directly yo the users database: > >NSERT INTO user >VALUES('localhost','USERNAME',PASSWORD('some_pass'),'SELECT','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); > >but i can't seem to get things to work. i've looked over the manual and a >small tutorial. > > >are there some steps i'm missing? > > >thanks. > > >jason upton > > > > > >6/20/2002 4:30:47 PM, "Emma Grant" <[EMAIL PROTECTED]> wrote: > > >Hi, I am just starting out with mysql. > > > >MySQL allows anon access so I don't have to log on to the sql just the > >linu server. > > > >I am trying to create a test database 'test2'. I am logged on as my user > >'emil' (not root) on a test linux server. When I go to create the > >database: > > > >mySQL> CREATE DATABASE test2; > > > >It gives me the following error. > > > >Error: 1044: Access denied for user '@localhost' for database test2 > > > >I then log in as root and change my privelages: > > > >mySQL> GRANT ALL ON test2.* for emil; > > > >But still I get the same error when I try to create it. > > > >In fact, I can't get on to a database even if the root creates it and > >then I GRANT the user 'emil' ALL to the newly created database. > > > >Can someone direct me in the right place? > > > >Thanks, > > > >Emma > > > > > > > >--------------------------------------------------------------------- > >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 --------------------------------------------------------------------- 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