Previous

TOC

Next

 

ACCESS CONTROL

Use this function only if you have clear understanding how the access system of mysql works. For detailed information reefer to the online mysql manual on http://www.mysql.com

 


Pic. 1

This function is used to create and modify user accounts . It is assumed you have an appropriate privileges (root) to Grant and Revoke privileges, select from mysql scope tables and modify them.

To grant or revoke privileges on existing accounts select the accounts to be modified from the account list. This list is shown only if you have "SELECT" global privilege. Then click GRANT or REVOKE button.


Pic. 2

Select Global, Database, Table or Column privilege or any combination of them. The picture below shows all these privileges selected. Clicking on the correspondent button you will select - deselect the given privilege. User account list is shown below the table.


Pic. 3

If you need to apply, for example, Database and Table privileges to the same group of accounts, you can do it, but it is recommended to Grant/Revoke them one by one beginning from the most meaningful (Database) and finishing with less meaningful (Table) in order to avoid confusing

  • Global Privileges give the user an access to ALL the databases on the given mysql server, including the same mysql database containing scope tables. In order to grant (or revoke) Global privileges select the desired privilege types by  holding the Ctrl button of your keyboard and using the mouse.
  • Database privileges give the user an access to all the tables of the selected database(s). To grant these privileges select one or more databases from the database pulldown list or type database names, separated by comma in the `otherDB' form. Here you can use wildcards `_' and `%' meaning 'any character' and 'any string' in the name of a database, or other characters, for example `\' - backslash to escape the 'underscore' character (in this case the underscore will be treated as an underscore in the database name rather than wildcard)

    USING VARIABLE
    {user} gives you the ability to grant (revoke) privileges to databases whose name contains the name of the user (some ISPs do that). So that,  if you type a string: {user}abc, {user}_db , the variable {user} will be substituted with user name for each user from the account list:
    the user john@localhost (the user `john' from the host `localhost') will be granted privileges on databases `johnabc' and `john_db',
    the user james@localhost will be granted the selected privileges on the databases `jamesabc' and `james_db'
    and so on.
    When non-alphanumerical characters are used in database names, the `INSERT INTO mysql.db' or 'UPDATE mysql.db' query will be generated, because the GRANT query does not accept such characters (as backslash, for example) in the database name.
  • Table privileges give the user an access to all the columns of the table. To grant or revoke privileges select a database from the database list and click the arrow beside if the page will not be reloaded by itself. Then select one or more table from the table list and select the privilege types
    For some reason you may want to type the name of the database and table names by yourself. To do that select `OTHER DATABASE' from the database pulldown menu and click the arrow if the page will not be reloaded by itself. Then type the name of the database in `Other DB' and the name of tables (comma separated) in `Tables' .
  • Column privileges provide an access to the selected columns only. Select a database, then (the page should be reloaded,  otherwise click the arrow) select a table (the page should be reloaded again). The list of the existing columns will be displayed. Select columns (one or more) and privilege types. Use `OTHER DATABASE' in order to ented custom database, table and column names.

Now, when the objects and privileges are selected, you may check `Preview queries' (recommended) in order to preview all generated queries, and click `GRANT' button (or REVOKE if you selected to revoke on the previous page).

On the next page you may preview or edit any query before to click `Confirm' button. You may return back (clicking `Back'  button) in order to correct your selections.

CREATE NEW ACCOUNTS:

Type the number of accounts you wish to create (see Pic. 1) . If all new accounts will be granted privileges on the same host you may want to type the name of this host in `Use this host name for all accounts', so that this host name will be applied to all accounts. Then click `NEXT >>' and complete the opened form with user names and passwords, correct the host names if necessarily.

After that, by clicking `NEXT >>' again you will be transferred to the page as shown on the Picture 2. Further procedure is the same as described for `GRANT' privileges above.

CHANGE PASSWORD

  • For selected user:
    Select the user from the account list and type a new password in `NEW PASSWORD' form. Check `For selected user'.  Click `CHANGE PASSWORD' to apply.
  • Your own password:
    Type new password, check `For myself' and click `NEW PASSWORD'.

NOTES:

If you do not have root access the account list will be empty. But you will be prompted to enter user@host name in the form that must appear in such a case: