]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/alistoragemanager/setupStorageDatabase.sh
Checking Storage Manager state added to ED. Now GUI reacts depending on status of SM.
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / setupStorageDatabase.sh
CommitLineData
5eb34a26 1#!/bin/bash
2HOST="localhost" # IP of machine on which mysql database is located
3PORT="5055"
4DATABASE="storage"
5USER="storage"
6PASS="storage123"
7TABLE="events"
0790c3e6 8STORAGE_PATH="/Users/Jerus/storedFiles"
164d3d29 9MAX_SIZE="10000000"
5eb34a26 10MAX_OCCUPATION="80"
11REMOVE_PERCENT="60"
164d3d29 12EVENTS_IN_FILE="5"
13EVENT_SERVER="pcald39fix" # IP of machine running alieventserver
14EVENT_SERVER_PORT="5024"
5eb34a26 15STORAGE_SERVER="localhost" # IP of machine running alistorage
164d3d29 16STORAGE_SERVER_PORT="5066" # server thread communication port
17STORAGE_CLIENT_PORT="5088" # client thread communication port
18XML_SERVER_PORT="5099" # server of xml files
5eb34a26 19mysql -u root -pdaq -e "create database if not exists $DATABASE;"
20mysql -u root -pdaq -e "grant ALL PRIVILEGES on $DATABASE.* to '$USER'@'$HOST' identified by '$PASS';"
21mysql -u root -pdaq -e "use $DATABASE;"
22mysql -u root -pdaq -e "CREATE TABLE IF NOT EXISTS $DATABASE.$TABLE(\
23run_number int(6) NOT NULL,\
24event_number int(6) NOT NULL,\
25system text(7) DEFAULT NULL,\
26multiplicity int(5) DEFAULT NULL,\
27permanent tinyint(1) DEFAULT NULL,\
28file_path text(100) DEFAULT NULL,\
29PRIMARY KEY(run_number,event_number));"
30
31echo "-----------------------------"
32echo "Databases successfuly created"
164d3d29 33echo "-----------------------------"