How to limit PHPMYADMIN access to specific database

Discussion in 'Databases' started by toraniz, Jan 10, 2016.

  1. #1
    Hi ,
    Can someone please tell me how I can give limit access from phpMYADMIN to a specific database as I have some other database that I do not want to give access to.
    just add this that I already have installed the phpmyadmin in my server.
    do I have to install another one into my website directory and configure it for the database I want to give access?
    or what?
    Thanks for any help .
     
    toraniz, Jan 10, 2016 IP
  2. David@CDNsun

    David@CDNsun Active Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #2
    Create a user in SQL with access only to the database but without access to the other databases.
     
    David@CDNsun, Jan 11, 2016 IP
  3. toraniz

    toraniz Member

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Thanks for your comment.
    but How to apply the process as I am new to these things.
    would be much appreciate if any how to steps to get to that.
    Regards
     
    toraniz, Jan 11, 2016 IP
  4. David@CDNsun

    David@CDNsun Active Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #4
    If it is MySQL then you can look here https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

    When you run
    CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password;

    Then the new user has no permission to do anything with databases

    and

    GRANT ALL PRIVILEGES ON database_name.* TO 'newuser'@'localhost';

    allows him to do everything with "database_name"

    Don't forget to run

    FLUSH PRIVILEGES;
     
    David@CDNsun, Jan 11, 2016 IP
  5. toraniz

    toraniz Member

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Thanks again for reply.
    I am sorry but it seems there is miss understanding of what I am trying to do.
    I know how to create a user and mysql database from server c/panel.
    actually what I want to do is that I need to give my c/panel access credential to a person to look at my database and works on a specific database from phpmyadmin which also gives ability accessing to my other database .
    so I want to limit to give access only to a specific database when the person access to phpmyadmin.
    hope this clarify for my needs.
    is that the way you mentioned and meant earlier for this .
    Thanks
     
    toraniz, Jan 11, 2016 IP
  6. Nigel Lew

    Nigel Lew Notable Member

    Messages:
    4,642
    Likes Received:
    406
    Best Answers:
    21
    Trophy Points:
    295
    #6
    Should be as easy as site.com/phpmyadmin which will only allow them into that db in particular.(unless I am nuts) sorta like site.com/webmail
     
    Nigel Lew, Jan 12, 2016 IP
  7. Sroids

    Sroids Greenhorn

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #7
    You could just take a backup of all databases.
     
    Sroids, May 18, 2016 IP