Other sop/dbadmin

Table Of Contents

Previous topic

DB Testing

Next topic

Custom DB Operations

This Page

Daya Bay Links

Content Skeleton

DB Administration

Temporary DB Setup by MySQL Administrators

For non-central temporary databases of a short lived nature it is very convenient to give table experts substantial permissions in temporary databases of specific names. Database names based on SVN user account names (listed at dybsvn:report:11) are recommended. The names must be prefixed with tmp_ as the db.py script enforces this as a safeguard for load and loadcat commands eg:

tmp_wangzm_offline_db
tmp_jpochoa_offline_db
tmp_ww_offline_db
tmp_blyth_offline_db
tmp_zhanl_offline_db

To grant permissions mysql administrators need to perform something like the below, which give all privileges except Grant_Priv:

mysql> grant all on tmp_wangzm_offline_db.* to 'wangzm'@'%' identified by 'realplaintextpassword' ;

Adminstrators can list existing database level permissions with:

mysql> select * from mysql.db ;
+-----------------------+----------------------+---------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
| Host                  | Db                   | User    | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Create_tmp_table_priv | Lock_tables_priv |
+-----------------------+----------------------+---------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+
| %                     | offline_db_20101125  | dayabay | Y           | N           | N           | N           | N           | N         | N          | N               | N          | N          | N                     | N                |
| %                     | offline_db_20101124  | dayabay | Y           | N           | N           | N           | N           | N         | N          | N               | N          | N          | N                     | N                |
| %                     | tmp_blyth_offline_db | blyth   | Y           | Y           | Y           | Y           | Y           | Y         | N          | Y               | Y          | Y          | Y                     | Y                |
...