Database

From Daya Bay
Jump to navigation Jump to search

Installation

Default dybinst installation includes the MySQL client libraries, but if you plan on running a local copy of the MySQL server (advised) then you will need to install and configure a MySQL server as described in MySQL_Installation.

Replication instructions

In this elog entry (password protected) are initial instructions on slaving to IHEP. This topic has essentially the same but made from notes taken while setting up BNL's slave to LBL's master.

Documentation

The Database Interface Manual is available as part of the Manual.

Updating Tables

See Updating Database Tables.

Misc

Web access

Use this link and see Miao's email for some details.

Testing the installation

(N.B. this is out of date)

Instructions on running the automated tests are [here], but here is the simple summary:

cd $SITEROOT/db/DbiRelease/cmt
source setup.sh
cd $SITEROOT/db/DatabaseInterface/DbiTest/scripts/
export ENV_TSQL_URL="mysql://localhost/dyb_temp:mysql://localhost/dyb_offline"
export ENV_TSQL_USER="dywriter"
export ENV_TSQL_PSWD="<writer_password>" 
python TestDbi.py

You should see a swift flurry of output finishing with:

Overall test status for 13 tests : O.K.  (13 passed)