Skip to content

Database related tests

Ilfat edited this page May 11, 2017 · 1 revision

Database related tests

Introduction
This article describes what databases can be used in development.

In general

On maxscale-jenkins.mariadb.com exists user mdbci_dev which has access to databases with prefix mdbci_dev_db.

To run test locally you need to create user.


CREATE USER 'mdbci_dev';
GRANT ALL PRIVILEGES ON `mdbci_dev_db%`.* TO 'mdbci_dev'@'%' IDENTIFIED BY 'mdbci_dev';
GRANT ALL PRIVILEGES ON `mdbci_dev_db%`.* TO 'mdbci_dev'@'localhost' IDENTIFIED BY 'mdbci_dev';
USE mysql;
SET PASSWORD FOR 'mdbci_dev'@'%' = PASSWORD('mdbci_dev');
SET PASSWORD FOR 'mdbci_dev'@'localhost' = PASSWORD('mdbci_dev');

And you need to created database mdbci_dev_db. Next sql command require you to use mysql as root (or user with rights to create databases)


CREATE DATABASE mdbci_dev_db

To access this databases there is a mysql defaults file in


${MDBCI_DIRECTORY}/scripts/db/defaults_file_dev

Use it like(equality sign is required)

mysql --defaults-file=${MDBCI_DIRECTORY}/scripts/db/defaults_file_dev ...

Benchmark parser

Benchmark parser has scripts for recreating and for dropping database named mdbci_dev_db_benchmark_parser_testing in


${MDBCI_DIRECTORY}/scripts/db/benchmark_parser