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.

How to give mysql permissions, but prevent cpanel permissions?

Discussion in 'MySQL' started by electroze, Apr 18, 2013.

  1. #1
    Does anyone know how to give a hired contractor programmer permissions to use/read/write to MySQL (possibly offer use of phpmyadmin too) but NOT allow full cpanel access?
     
    electroze, Apr 18, 2013 IP
  2. diplox

    diplox Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Remote access to MySQL might require modifying the database configuration file, typically called my.cnf, in order to permit remote access(generally you'll need to make sure skip-networking is commented out and that the bind-address is set to the external IP.)

    Once that's done you can use the standard GRANT syntax to give access:
    
    GRANT ALL ON foo.* TO contractor@'33.33.33.33' IDENTIFIED BY 'PASSWORD';
    FLUSH PRIVILEGES; 
    
    Code (markup):
    where foo is the database name, contractor would be the login name, 33.33.33.33 should be their IP, and make password the desired password.

    Assuming it's not possible to modify my.cnf, and it's not already configured on the server end to allow remote access, it should still be possible to provide access without giving cpanel access by installing a copy of phpmyadmin into your hosting account. Even if it's provided by cpanel there's no reason you can't have your own install of it in your hosting account after all.
     
    diplox, Apr 19, 2013 IP