Grant not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce A. Julseth

    Grant not working

    I am doing something wrong or have something set up wrong.

    When I issue

    mysql> grant all on * to mike identified by 'joented' with grant
    option;
    Query OK, 0 rows affected (0.69 sec)

    It looks like the grant worked. Here is what the mysql.user table looks
    like.

    mysql> select user,password, host from mysql.user;
    +---------+---------------------+-----------+
    | user | password | host |
    +---------+---------------------+-----------+
    | root | | localhost |
    | root | | % |
    | | 3823a5ee1f83162 6 | localhost |
    | | | % |
    | bruceaj | 426d920b373a5e5 b | % |
    | mike | 426d920b373a5e5 b | % |
    | peter | 426d920b373a5e5 b | % |
    | jim | 426d920b373a5e5 b | % |
    +---------+-----------------==-+-----------+

    Now, when I issue a mysql command for mike, I get

    C:\mysql\bin>my sql -u mike -pjoented;
    ERROR 1045: Access denied for user: 'mike@localhost ' (Using password:
    YES)

    The ONLY User I can login as is root, as:

    mysql -u root

    Appreciate your help in identifing what what I have screwed up, and how do I
    fix it.

    Thanks.....

    Bruce


  • Tim Van Wassenhove

    #2
    Re: Grant not working

    On 2003-12-18, Bruce A. Julseth <bruceaj@attglo bal.net> wrote:[color=blue]
    > When I issue
    >
    > mysql> grant all on * to mike identified by 'joented' with grant
    > option;
    > Query OK, 0 rows affected (0.69 sec)
    >
    > It looks like the grant worked.[/color]

    If i remember well, the manual says that you have to reload...

    mysqladmin -u root -p reload


    --
    verum ipsum factum

    Comment

    • Kevin Thorpe

      #3
      Re: Grant not working

      Tim Van Wassenhove wrote:[color=blue]
      > On 2003-12-18, Bruce A. Julseth <bruceaj@attglo bal.net> wrote:
      >[color=green]
      >>When I issue
      >>
      >> mysql> grant all on * to mike identified by 'joented' with grant
      >>option;
      >> Query OK, 0 rows affected (0.69 sec)
      >>
      >>It looks like the grant worked.[/color]
      >
      >
      > If i remember well, the manual says that you have to reload...
      >
      > mysqladmin -u root -p reload
      >[/color]

      or
      mysqladmin -u root -p flush-privileges

      .... also not that you shouldn't publish passwords so you ought to change it.

      Comment

      • Bruce A. Julseth

        #4
        Re: Grant not working

        I tried both,
        mysqladmin -u root flush-privileges
        and
        mysqladmin -u root reload

        NOTE: root has no password on purpose.

        I still fail with the following scenario:

        C:\Documents and Settings\Bruce A. Julseth>mysql -u root
        Welcome to the MySQL monitor. Commands end with ; or \g.
        Your MySQL connection id is 8 to server version: 4.0.14-max-debug

        Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

        mysql> grant all on * to mike identified by 'joented' with grant
        option;
        Query OK, 0 rows affected (0.65 sec)

        mysql> quit
        Bye

        C:\Documents and Settings\Bruce A. Julseth>mysql -u mike -pjoented
        ERROR 1045: Access denied for user: 'mike@localhost ' (Using password:
        YES)

        As for the "Open" password, this development is going on a private,
        non-networked machine. But thanks for catching the potenial problem.

        Now, I hope you folks out there is PHP land can provide some more
        suggestions.

        Bruce

        "Kevin Thorpe" <kevin@pricetra k.com> wrote in message
        news:3FE1B7B8.3 080708@pricetra k.com...[color=blue]
        > Tim Van Wassenhove wrote:[color=green]
        > > On 2003-12-18, Bruce A. Julseth <bruceaj@attglo bal.net> wrote:
        > >[color=darkred]
        > >>When I issue
        > >>
        > >> mysql> grant all on * to mike identified by 'joented' with grant
        > >>option;
        > >> Query OK, 0 rows affected (0.69 sec)
        > >>
        > >>It looks like the grant worked.[/color]
        > >
        > >
        > > If i remember well, the manual says that you have to reload...
        > >
        > > mysqladmin -u root -p reload
        > >[/color]
        >
        > or
        > mysqladmin -u root -p flush-privileges
        >
        > ... also not that you shouldn't publish passwords so you ought to change[/color]
        it.[color=blue]
        >[/color]


        Comment

        Working...