In this chapter we are going to have a brief look at the administration functions in the MySQL.

Administration functions of MYSQL usually include:

  • Starting and stopping MYSQL server.
  • Viewing and editing MYSQL configuration file (my.ini).
  • Creating user accounts, assigning privileges.
  • Displaying connections of MYSQL.
  • Importing and export data.
  • Maintaining server log and display entries.
  • Backing up the data.

MYSQL provides access control and privileges to user based on the account on which the user is logged in. Admin can define rules for user access to the database. The verification of user access can be done at two levels.

Connection verification: When a client logs in to a MYSQL server, the username, password is authenticated and host from which client is connected to server is checked to match with host on MYSQL grant table.

Request verification: When a statement is executed from the client, the privileges to execute the statement for particular user are checked.

The privileges are maintained in the grant tables of the mysql database. The grant tables are:

  • user: It contains the global and account privileges. MYSQL uses it to accept or reject a connection from the host.
  • db: This contains privileges at the database level and objects of DB such as tables, triggers, views, stored procedures, etc...
  • table_priv and column_priv: This contains privileges applied to tables and columns.
  • procs_priv: This contains stored functions and stored procedure privileges.

Following chapters discuss further each individual administrational activity.