Database - MySQL/MariaDB

Requirements

You will need a running MySQL or MariaDB server.

You need a dedicated server running where everybody has access to over the network. It’s also possible to host the database in the Cloud or at you webhost. A web search will show you how to install one or see operating system depended installation instructions below.

Creating a new library

When you create a new library the software will automatically create the new database for you.

All you have to provide is the login information (user & password), the database server (server name or IP address) and the database name - how you want to call the new database (Example: das_element). The software will setup all the tables for you. Nothing that you have to do.

Optional: You can use a SSL certificate.

Install MySQL/MariaDB

On a machine that’s accessible by everybody on the network (e.g. Virtual Machine) install the MySQL/MariaDB Software.

Depending on you operating system follow the installation instructions (Step 1) below. Make sure to configure the server correctly (Step 2). The last step (Step 3) is to create a User for the actual library.

 

 

Install MySQL + phpMyAdmin - Docker Compose

A easy way to create a new database server is to use Docker Compose
Please make sure to install Docker and Docker Compose first.

  1. create a new folder: database_mysql

  2. create a new text file inside the folder called: docker-compose.yml

  3. add this code snipped into the file …

version: '3' services: db: image: mysql:8 container_name: db environment: MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: password MYSQL_USER: dbuser MYSQL_PASSWORD: dbuser ports: - 3306:3306 volumes: - mysql-data:/var/lib/mysql phpmyadmin: image: phpmyadmin/phpmyadmin container_name: pma links: - db environment: PMA_HOST: db PMA_PORT: 3306 PMA_ARBITRARY: 1 restart: always ports: - 8081:80 volumes: mysql-data:

 

Run this command to start the database:

docker-compose up -d 

 

In a web browser you can now access phpMyAdmin: http://localhost:8081
Login as root user. Login information as defined in the docker-compose.yml file.

 

Change the database user privileges

If you setup a database user, please make sure to grant all privileges to that user.
The user needs to be able to create a database, insert, update and delete database entries.

Use phpMyAdmin (need to be logged in as root user) or login with the terminal via mysql

mysql> GRANT ALL PRIVILEGES on *.* TO 'dbuser'@'localhost';