TestBeam2015DB¶
How to connect¶
1) Login in to "gm2straw6" as "gm2" user
2) Connect to DB:
mysql --user=gm2user --password=alpha_2pi gm2sc
Using the DB¶
Note that all tables have a config_id, which increments at each DB write. Use this to sync between different tables (e.g. all table entries with same config_id are from same DB write, e.g same run).
List all available data tables (e.g. run data, config data, slow control data, etc):
show tables;
List all data in a table:
select * from <table>;
e.g.
select * from run;
List data columns in a table:
show columns from <table>;
e.g.
show columns from run;
List specific columns in table:
select <col1,col2,...> from <table>;
e.g.
select run_number,start_run_comment from run;
Helpful info¶
- A handy list of mySQL commands: https://www.pantz.org/software/mysql/mysqlcommands.html
Useful examples¶
Show all start of run comments:
select config_id,run_number,start_run_comment from run;
Show discriminator thresholds:
select config_id,lbid,tdcid,name,value from tdcs_config where name = "DTHRThreshold";