1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Grant privileges are not being applied?

Discussion in 'Databases' started by vrutin, Jul 8, 2013.

  1. #1
    Hey, Guys
    I am trying this sql query:
    GRANT SELECT, UPDATE, INSERT, CREATE, DELETE ON mySample.* TO Vrutin@'localhost' IDENTIFIED BY 'password';
    Code (markup):
    [​IMG]

    I did flush the privileges.

    Any ideas?
     
    Last edited: Jul 8, 2013
    vrutin, Jul 8, 2013 IP
  2. convertin

    convertin Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    First, make sure how the user 'Vrutin' has been created:
    mysql> select * from mysql.user where user like 'Vrutin'
    Do you see 'localhost' value is 'Host' column? If not, probably the user was not associated with domain 'localhost'. In this case you should compose GRANT-query as follows:
    GRANT SELECT, UPDATE, INSERT, CREATE, DELETE ON mySample.* TO Vrutin
     
    convertin, Jul 9, 2013 IP
  3. vrutin

    vrutin Greenhorn

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Tried everything you said above, but no affect.
     
    vrutin, Jul 9, 2013 IP
  4. compevo

    compevo Member

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #4
    Try removing the '' around localhost and even try without the @localhost if all fails.
    One more thing, are you sure you're running the MySQL query as a privileged user who can actually give out privileges? Basically it would be a root/admin MySQL user otherwise it will never work if the account you're using to grant privileges doesn't have permissions.
     
    compevo, Jul 14, 2013 IP