using grant help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gwalters
    New Member
    • Nov 2006
    • 8

    #1

    using grant help needed

    I'm using MySql 4.022 and am having a problem with grant usage running on local host trying to set up users.

    I used this command

    grant all on acutrack.* to 'gwalters' identified by 'rutan';

    I then try to run mysql with the following command

    mysql -u gwalters -p=rutan acutrack
    or
    mysql -u gwalters -prutan acutrack

    and then get access denied.

    What did I do wrong??
  • gwalters
    New Member
    • Nov 2006
    • 8

    #2
    I've solved this puzzle myself. The answer was in a book "MySQL" by Paul DuBois which I bought in Barns & Noble.

    gwalters could connect from anywhere except localhost. To fix this you need to
    remove the anonymous user entry which comes as a default with mysql.

    Launch mysql as the root user using the mysql database.

    mysql -u root mysql
    mysql> delete from user where user="";
    mysql> flush privileges;

    removes the anonymous user and now gwalters can connect at localhost.

    Comment

    Working...