-
Notifications
You must be signed in to change notification settings - Fork 7
Database Installation
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'
(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 by default for MariaDB one have to be root to login mysql as root. So it is something like
sudo mysql -u root -p
for MariaDBCREATE SCHEMA rcdb; CREATE USER 'rcdb'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON rcdb.* TO 'rcdb'@'localhost';
-
Create database structure:
python $RCDB_HOME/python/create_empty_db.py -c mysql://rcdb:password@localhost/rcdb
The script will make you to add
--i-am-sure
flag
RCDB uses Alembic to track and update database version. 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: