Viz Mosart Administrator Guide

Version 4.0 | Published September 22, 2020 ©

Creating and Upgrading Mosart templatedb

The database used for Template Database is named ’mosarttemplatedb’. The following procedure expects the Viz Mosart Server Suite has already been installed. This is due to running the batch file RunDbScripts.cmd found in the following location: %ProgramFiles%\Mosart Medialab\Mosart Server\BatchFiles.

Before continuing, ensure Viz Mosart has been installed (refer to Viz Mosart Administrator Guide, section on Installation) along with WampServer (refer to Installing WampServer).

This section contains the following topics:

Verify WampServer is running

Verify WampServer is running by performing these steps:

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

    • If not, start WampServer from the Start menu it should then appear green in the system tray.

    • 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 through the Db00Create.sql script found in the following location, 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 are run through a batch file, RunDbScripts.cmd, found in the following location:

  • %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. Additionally, the reference to the tool itself should also be verified.

The following steps should be performed:

  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 (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 has replaced root.

  7. Save the file if you have changed it.

Running Scripts Manually

Run the scripts manually by following these steps:

  1. Start phpMyAdmin, refer to Starting phpMyAdmin for more information.

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

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

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

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