mySQL Grant Command
|You can use the mySQL GRANT command to give priveledges to users to a specific database.
The syntax is as follows and follows the standard mySQL keywords and syntax you would perhaps use in a PHP script.
The priveledges you can grant to a user are vast and for added security, you should only grant permissions to a users on a database that are requried by your application:
Example use of the above syntax and privileges:
The above wildcard (*) will replace the entire list of tables in the database. You can specify just specify one table name if required. You can also specify an IP Address for the domain part of the “TO” command such as ‘firstname.lastname@example.org’.
Usually, only server administrators should worry about this kind of permission configuration. If you are a normal webmaster using a typical control panel such as Cpanel – all this is done behind the scenes and you will not need to worry about setting up such code.
|mySQL Grant Command|