-
Notifications
You must be signed in to change notification settings - Fork 7
Database Installation
##Prerequisites
In order to do the steps below one has to set environment variables as it is
described in RCDB installation section. RCDB_CONNECTION
should be set also (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 should be
mysql://rcdb:password@localhost/rcdb
and
export RCDB_CONNECTION='mysql://rcdb:password@localhost/rcdb'
##Create MySQL database (RCDB is also tested for MariaDB. RCDB should also work with other MySQL forks while it isn't tested)
Create database structure:
cd $RCDB_HOME/sql
mysql -u root -p < schema.mysql.sql
Create user and give privileges:
mysql -u root -p
CREATE USER 'rcdb'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON rcdb.* TO 'rcdb'@'localhost';
RCDB uses Alembic to track and update database version. So after creating db scheme one has to run alembic to upgrade DB to the latest version:
cd $RCDB_HOME
alembic upgrade head
After this the database is of the latest version and is ready to be used
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: