-
Notifications
You must be signed in to change notification settings - Fork 7
Database Installation
Evironment variables have to be set.
TL;DR; runenvironment.*
script located in the RCDB root dir(more details).
RCDB_CONNECTION
must also be set (see below).
Lets assume that one wants to install RCDB to the following database:
- database location:
localhost
- database name:
rcdb
- database user name:
rcdb
- database user password:
password
then the connection string is
mysql://rcdb:password@localhost/rcdb
and RCDB_CONNECTION
must be:
export RCDB_CONNECTION='mysql://rcdb:password@localhost/rcdb'
(RCDB is tested for MySQL and MariaDB. Also RCDB should work with other MySQL forks while it hasn't been tested)
-
Create DB(aka schema) and a user with privileges:
mysql -u root -p
note, that root privileges are required to run
mysql - u root ...
for MariaDB by default. Run something likesudo mysql -u root -p
for MariaDBCREATE SCHEMA rcdb; CREATE USER 'rcdb'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON rcdb.* TO 'rcdb'@'localhost';
Both creating schema for the first time for a fresh database or updating the existing schema is done with Alembic
Just run:
cd $RCDB_HOME
./alembic_rcdb upgrade head
Since there where problems with installing alembic on some machines in counting house RCDB ships a copy of it within itself;
alembic_rcdb
command runs this embedded alembic version.
Getting started & basic usage:
- Installation
- Select values tutorial (python)
- Query syntax
- Add data (python)
- CLI Basics
RCDB Explained:
- Connection
- DB and APIs structure
- SQL examples
- Creating condition types
- Adding condition values
- Saving files
- SQLAlchemy
- Logging
- Performance
Command line tools:
DAQ: