Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
Table of Contents |
---|
HPS uses a conditions database conditions backend which is accessible through the DatabaseConditionsManager.
...
No username or password is required when connecting locally in this way.
In order to create a local SQLite database, you will need to create a snapshot of the MySQL database and convert it to a SQLite db file.
This converter script can be used to produce the db file.
It can be downloaded using these commands:
Code Block | ||
---|---|---|
| ||
wget https://raw.githubusercontent.com/dumblob/mysql2sqlite/master/mysql2sqlite
chmod +x mysql2sqlite |
You can create a dump of the current conditions database using this command:
Code Block | ||
---|---|---|
| ||
mysqldump --skip-extended-insert --compact -u hpsuser --password=darkphoton -h hpsdb.jlab.org --lock-tables=false hps_conditions > hps_conditions.mysql |
Now, you can load it into SQLite as follows:
Code Block | ||
---|---|---|
| ||
mysql2sqlite hps_conditions.mysql | sqlite3 hps_conditions.db |
You should have an up to date copy of the master conditions database locally, now.
...