SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: two db one cannote delete the other

  1. #1
    SitePoint Member
    Join Date
    May 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    two db one cannote delete the other

    example in a server there are two sitos;
    eachone has its db;
    in a sites a bad customer can insert bad code for delete table and itself database; is possible to limit its action only at its db?
    this because in his site with a drop command can delete every
    db in the server;

    I know one solution is not assign at it the privilege drop;
    but if I want assign all privileges but the site's owner can only use inner
    is db and not external;

  2. #2
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can have two users: one (admin) for yourself, another (limited to one database) for script.

  3. #3
    SitePoint Member
    Join Date
    May 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how is possible make
    another (limited to one database) ?
    for example with phpmyadmin and mysql .

    if I have db1 and db2 (inner server)
    is possible to limit user db1 to make action on db2?
    example: to block also this action:
    db1's user, that insert sql injection in is db1 for delete db2.

    So, the concept of limitation, that you intend, remain valid also for this case?

  4. #4
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    Location
    Ukraine
    Posts
    1,403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    GRANT ALL PRIVILEGES
       ON test.*
       TO 'anotheruser'@'localhost'
    IDENTIFIED
       BY 'goodsecret'

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •