3 HOST="localhost" # IP of machine on which mysql database is located
9 STORAGE_PATH="/local/storedFiles"
14 EVENT_SERVER="pcald39fix" # IP of machine running alieventserver
15 EVENT_SERVER_PORT="5024"
16 STORAGE_SERVER="localhost" # IP of machine running alistorage
17 STORAGE_SERVER_PORT="5066" # server thread communication port
18 STORAGE_CLIENT_PORT="5088" # client thread communication port
19 XML_SERVER_PORT="5099" # server of xml files
20 mysql -u root -p$DB_PASS -e "create database if not exists $DATABASE;"
21 mysql -u root -p$DB_PASS -e "grant ALL PRIVILEGES on $DATABASE.* to '$USER'@'$HOST' identified by '$PASS';"
22 mysql -u root -p$DB_PASS -e "use $DATABASE;"
23 mysql -u root -p$DB_PASS -e "CREATE TABLE IF NOT EXISTS $DATABASE.$TABLE(\
24 run_number int(6) NOT NULL,\
25 event_number int(6) NOT NULL,\
26 system text(7) DEFAULT NULL,\
27 multiplicity int(5) DEFAULT NULL,\
28 permanent tinyint(1) DEFAULT NULL,\
29 file_path text(100) DEFAULT NULL,\
30 PRIMARY KEY(run_number,event_number));"
32 echo "-----------------------------"
33 echo "Databases successfuly created"
34 echo "-----------------------------"