Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README_SETUP.md 1.76 KiB
Setup of the CaosDB SQL back end
Dependencies
-
MariaDB Client 10.1
,MySQL Client 5.5
, or later versions. In the case of MySQL, version 5.6 is recommended.
- make
Create the configuration
- Create an empty
.config
file. For the default values and the meaning of these default values see config.defaults. For each parameter that you want to change, add a corresponding line in your.config
file. You probably want to change the passwords. As the passwords are stored unencrypted in the.config
file, make sure nobody else can read it.- If there is no
mysql-config-editor
(MySQL 5.5
. andMariaDB
) then theMYSQL_USER_PASSWORD
must be provided, that is the password of theMYSQL_USER
. - If you are using MariaDB and the
root
database user uses pam authentication, no pasword string is required. You can set theMYSQL_USER_PASSWORD
to an empty string. But you need to be logged in as root for the installation and upgrade process.
- If there is no
Setup the SQL database for CaosDB
- Run
make install
. If a there is a database with the name you have choosen during the configuration, you need to reconfigure or delete the database first.
Upgrade the SQL database
- Run
make upgrade
. This upgrades the database to the last version.
Drop Database
- If you want to delete your database, run
make drop-$DATABASE_NAME
. Use this with caution!!! If you did not backup your database, everything will be lost afterwards. And no, there is no additional prompt to ask if you are sure. If youmake drop-...
, you actually delete the database.
Unit tests
- We use MyTAP-1.0 for unit tests.
- Tests are in
tests/test_*.sql
. - Run
make test
.