Enabling remote access to MySQL just for reading?

Discussion in 'MySQL' started by digimanuk, Sep 12, 2007.

  1. #1
    I have an application that requires access to a MySQL database, but since it could be installed on any PC worldwide the database would have to allow remote access.

    I was wondering whether it is possible to only allow remote access for reading, as this is all the application needs?

    If someone somehow managed to decompile the application code (C++) and get the database password, would this prevent them from damaging the database since they could only read the contents, and not write to it?

    Thanks.
     
    digimanuk, Sep 12, 2007 IP
  2. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You can create a new mysql user with only SELECT privileges on the database.

    Use this user for remote access. Even if the password is known, the user
    can only read the db and not change it.
     
    Kuldeep1952, Sep 12, 2007 IP
  3. digimanuk

    digimanuk Peon

    Messages:
    97
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Excellent, thank you. I'll do that.

    I'll also store any important stuff in a separate database that the remote user account will have no access to at all.
     
    digimanuk, Sep 14, 2007 IP