This section presents both installing and creating a database for Viz Mosart templates.
Prerequisites
A MySQL or equivalent, database server (MariaDB, AWS Aurora, MySQL) installed and accessible from the Viz Mosart server.
This database server can be either dedicated to the Mosart automation servers or be an existing in-house or cloud-based server.
Note: We recommend considering MariaDB as it is an open-source platform that still provides robust database management capabilities and compatibility with MySQL standards.
A database user with credentials sufficient for creating and altering the database. This is also mandatory for AV Automation, which automatically updates the template database.
A local MySQL client or tool that can connect and run SQL scripts towards the database.
Note: The Viz Mosart server can operate with both MySQL 5.x and 8.x.
MySQL Database Servers and Clients
Wampserver: A complete Windows web development environment using Apache2 and PHP. It contains both MySQL and MariaDB database servers and supports PhpMyAdmin or Adminer for database management and configuration.
Note: Wampserver contains MySQL 5.x
This method is recommended when installing a dedicated template database for the Mosart automation servers. It provides remote access to the database, via http.
MySQL server: Use the MySQL Installer to install the last native MySQL database server. Recommended to also install the MySQL Workbench as a client for managing and configuring the database server.
MySQL Workbench: Provides an integrated tools environment for database management and administration.
MariaDB: Open source equivalent of MySQL server.
HeidiSQL: Simple free MySql/ProgreSQL/Microsoft SQL client.
dbVisualizer: Client for multiple database servers.
Refer to section Prerequisites for details of supported versions.
Verify the connection to the template database
Before configuring the Mosart server, verify the connection between the template database and the Mosart server, using a MySql client.
Typical issues at this stage relate to firewall and credentials/permissions.
MySQL Users
There are four types of users of a Mosart template database:
Role | Description | Application |
---|---|---|
Server management | Full rights, at least the possibility to create and alter databases | |
Database management | Full rights within a single database / schema | Minimum rights for AV Automation |
Database use (read/write) | Needs CRUD operations on a single database | Minimum rights for Manus Admin |
Database use (read only) | Only need read operations on a single database | Minimum rights for ActiveX |
It is recommend is to create two users for Mosart automation.
- One for the Mosart Server (AV Automation and ManusAdmin) will full admin rights on the Mosart database.
- One for the Mosart ActiveX, which only requires rights to perform read operations.
Initial Mosart Template Database
File Location
The initial database is located in the Sql directory as part of the Mosart server installation.
Pick the .sql file with the highest version number.
In this example, 1.0.5:
InitialMosartTemplateDatabase_1.0.5.sql
This SQL file (containing the initial Mosart Template Database) is used to create the initial database on the database server.
Creating an Initial Template Database
To create a Template Database
You can create the initial template database in one of two ways:
By importing the initial database SQL file using a database client. All MySql database clients given above supports import of SQL scripts. Normally this requires root access.
Using the MySQL command line tool mysql.exe. The script RunDbScripts.cmd contains command lines to import the initial database using MySQL. This script is located in the BatchFiles directory as part of the Mosart server installation.
Option 2 (script below) requires that you have first created an empty database
mosarttemplatedb
.RunDbScripts.cmd
::: RunDbScripts.cmd:
::: Command script to upload an initial and empty database as the Mosart template database:
::: Option 1: Invoke mysql with user credentials on the command line.
::: Note localhost is assumed if host is not given.
mysql [--host=hostname] --user=username --password=password mosarttemplatedb < ../Sql/InitialMosartTemplateDatabase_1.0.5.sql
::: Option 2: Invoke mysql with user credentials from the corresponding mysql.ini file.
mysql --defaults-extra-file=mysql.ini < ../Sql/InitialMosartTemplateDatabase_1.0.5.sql
After import, a database named mosarttemplatedb is created.
mysql.exe
mysql.exe is part of MySQL Server, MySQL Workbench or Wampserver installations