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