Viz Mosart Administrator Guide
Version 5.7 | Published July 22, 2024 ©
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
-
Transfer tables and data to the new server.
-
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
-
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 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
-
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
-
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. -
Locate mysql.exe and change the contents of RunDbScripts.cmd accordingly.
-
Save RunDbScripts.cmd with ANSI encoding.
For example, in Notepad, choose File > Save As, then Encoding: ANSI. -
Edit, do not open, mysql.ini. File contents should be similar to the following:
[mysql] host=localhost database=mosarttemplatedb user=root password=
-
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.
-
-
Save the file if you have changed it.
Running Scripts Manually
To Run the Database Scripts Manually
-
Start phpMyAdmin.
-
Create the database, mosarttemplatedb, if not already done.
-
Upgrade the database using the scripts from the appropriate location:
-
%ProgramFiles%\Mosart Medialab\Mosart Server\Sql
-
%ProgramFiles(x86)%\Mosart Medialab\Mosart Server\Sql
-