Viz Mosart Administrator Guide

Version 5.0 | Published November 09, 2022 ©

Creating and Upgrading a Viz Mosart Template Database

The Viz Mosart Template Database uses a schema called mosarttemplatedb.

Prerequisties

  • Before continuing, ensure Viz Mosart has been installed. Refer to section Installation, and the latest Release Notes.
    A Viz Mosart installation includes an essential database creation batch file RunDbScripts.cmd written to: %ProgramFiles%\Mosart Medialab\Mosart Server\BatchFiles.

  • An installed WampServer (refer to section Installing WampServer).

This section contains the following topics:

Upgrading MySQL 5.x to MySQL 8.x

Migrating the Mosart templatedb

In connection with the migration of the template database to the new version of the database server, it will be necessary to transfer all data from the old, following the recommendations in Template Database section Backup and Recovery.

To Migrate the Template Data

  1. Transfer tables and data to the new server.

  2. Run the command below.

    ALTER USER ‘username’@’*’ IDENTIFIED WITH ‘mysql_native_password’ BY ‘password’;

    replacing ‘username’ and ‘password’ placeholders to their actual values.

Verifying the WampServer

To Verify WampServer is Running

  1. Check the WampServer icon is present in the system tray.

    1. If not, start WampServer from the Start menu.

    2. It should then appear green in the System tray.

  2. If the WampServer icon is not green, click the icon and select Start All Services.

Running Database Scripts

The Viz Mosart Database can be created automatically using the Db00Create.sql script.

Location of Script

Navigate to the following locations, for x86 and x64 machines respectively:

  • %ProgramFiles%\Mosart Medialab\Mosart Server\Sql

  • %ProgramFiles(x86)%\Mosart Medialab\Mosart Server\Sql

There are also several upgrade scripts:

  • Db01Change….sql

  • Db02Change….sql

  • and so on

Database changes are implemented as upgrade scripts rather than as new versions of the create script. This is to avoid destroying existing data.

  • Scripts may also be run manually. It is recommended to run scripts automatically.

  • If problems arise when running scripts automatically, more information on manually running scripts can be found later in this section.

Running Scripts Automatically

Scripts run from a batch file, RunDbScripts.cmd.

Location of Scripts

Navigate to the following locations, for x86 and x64 machines respectively:

  • %ProgramFiles%\Mosart Medialab\Mosart Server\BatchFiles\

  • %ProgramFiles(x86)%\Mosart Medialab\Mosart Server\BatchFiles\

The file refers to the MySQL command line tool mysql and an .ini file used by that tool.

  • The .ini file is installed into the same folder as the batch file, but contents should be verified and amended as needed.

  • The reference to the tool itself should also be verified.

To Run the Database Scripts

  1. Edit, do not open, RunDbScripts.cmd. File contents should be similar to the following:

    REM This file MUST be saved with Encoding = ANSI
    for %%f in (<file list>) do C:\wamp\bin\mysql\mysql5.5.8\bin\mysql --defaults-extra-file=mysql.ini < %%f
    pause
  2. Check if the stated folder (in this example, C:\wamp\bin\mysql\mysql5.5.8\bin) exists and contains mysql.exe.
    If so, continue with step 5. If not, continue to step 3.

  3. Locate mysql.exe and change the contents of RunDbScripts.cmd accordingly.

  4. Save RunDbScripts.cmd with ANSI encoding.
    For example, in Notepad, choose File > Save As, then Encoding: ANSI.

  5. Edit, do not open, mysql.ini. File contents should be similar to the following:

    [mysql] host=localhost database=mosarttemplatedb user=root password=
  6. Verify entries in the file and change if necessary:

    • host=localhost : If MySql is running on another PC, replace localhost by the name or IP address of this other PC.

    • database= mosarttemplatedb : Should not be changed.

    • user=root : This is the default admin user. If you want to run the scripts with another user, replace with the name of a user with sufficient privileges.

    • password= : The default root password is empty. Replace if you have changed the root password or have replaced root.

  7. Save the file if you have changed it.

Running Scripts Manually

To Run the Database Scripts Manually

  1. Start phpMyAdmin.

  2. Create the database, mosarttemplatedb, if not already done.

  3. Upgrade the database using the scripts from the appropriate location:

    • %ProgramFiles%\Mosart Medialab\Mosart Server\Sql

    • %ProgramFiles(x86)%\Mosart Medialab\Mosart Server\Sql