X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MONITOR%2Falistoragemanager%2FsetupStorageDatabase.sh;h=c4a735a3240c0d47ecf99479a3f4bf3d4ef01bd3;hb=e5e84092353c6e86ceec82ee35101601effdaeff;hp=29f110e8bce6fee500b834ec7c3e65b06d5812fa;hpb=afc10bae52f2f9f1f073a7dba3377949e095bb52;p=u%2Fmrichter%2FAliRoot.git diff --git a/MONITOR/alistoragemanager/setupStorageDatabase.sh b/MONITOR/alistoragemanager/setupStorageDatabase.sh old mode 100755 new mode 100644 index 29f110e8bce..c4a735a3240 --- a/MONITOR/alistoragemanager/setupStorageDatabase.sh +++ b/MONITOR/alistoragemanager/setupStorageDatabase.sh @@ -1,25 +1,27 @@ #!/bin/bash HOST="localhost" # IP of machine on which mysql database is located -PORT="5055" -DATABASE="storage" -USER="storage" -PASS="storage123" -TABLE="events" -STORAGE_PATH="/Users/Jerus/storedFiles" -MAX_SIZE="30000000" -MAX_OCCUPATION="80" -REMOVE_PERCENT="60" -EVENTS_IN_FILE="5" -EVENT_SERVER="pcald39fix" # IP of machine running alieventserver -EVENT_SERVER_PORT="5024" +PORT="123" +DATABASE="database" +USER="user" +PASS="pass123" +TABLE="table" +STORAGE_PATH="/some/path/" +MAX_SIZE="300000000" +MAX_OCCUPATION="100" +REMOVE_PERCENT="50" +EVENTS_IN_FILE="20" +EVENT_SERVER="localhost" # IP of machine running alieventserver +EVENT_SERVER_USER="user" +EVENT_SERVER_PORT="124" STORAGE_SERVER="localhost" # IP of machine running alistorage -STORAGE_SERVER_PORT="5066" # server thread communication port -STORAGE_CLIENT_PORT="5088" # client thread communication port -XML_SERVER_PORT="5099" # server of xml files -mysql -u root -pdaq -e "create database if not exists $DATABASE;" -mysql -u root -pdaq -e "grant ALL PRIVILEGES on $DATABASE.* to '$USER'@'$HOST' identified by '$PASS';" -mysql -u root -pdaq -e "use $DATABASE;" -mysql -u root -pdaq -e "CREATE TABLE IF NOT EXISTS $DATABASE.$TABLE(\ +STORAGE_SERVER_USER="user" +STORAGE_SERVER_PORT="125" # server thread communication port +STORAGE_CLIENT_PORT="126" # client thread communication port +XML_SERVER_PORT="127" # server of xml files +mysql -u root -ppassword -e "create database if not exists $DATABASE;" +mysql -u root -ppassword -e "grant ALL PRIVILEGES on $DATABASE.* to '$USER'@'$HOST' identified by '$PASS';" +mysql -u root -ppassword -e "use $DATABASE;" +mysql -u root -ppassword -e "CREATE TABLE IF NOT EXISTS $DATABASE.$TABLE(\ run_number int(6) NOT NULL,\ event_number int(6) NOT NULL,\ system text(7) DEFAULT NULL,\ @@ -30,4 +32,4 @@ PRIMARY KEY(run_number,event_number));" echo "-----------------------------" echo "Databases successfuly created" -echo "-----------------------------" \ No newline at end of file +echo "-----------------------------"