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