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