Database Setup
A database setup is required for any conversion from and to a database record. The tasks application does not check for a valid database setup before attempting the conversion, but will issue an exception if a database connection cannot be established.
A database is not required for validating a MusicXML document, or for conversion from MusicXML to LilyPond. These features can be used without a database setup.
The MusicXML Tasks application permits interaction with the following database types:
The application has been tested on Windows 10 and Linux.
Installation
The application user is expected to download and install their own database that the tasks application will use. No database is included with the application.
Information about downloading and installing each type of database are at the links below:
Creating a database and a database user
Once a database has been installed, it's required to create a database with a name, and a database user with a password. These values are then entered in the tasks interface under the DB Settings tab.
The database user must have "grant all" privileges on the database.
A database installation may include a web-based admin interface for performing these tasks.
It's also possible to administer the database using a command line tool provided with the database. Statements for each database type are given below for the default connection values.
MySQL: mysql
For the MySQL command-line tool mysql,
Create database:
Create database user ("identified by" clause contains the password):
Switch to database at prompt:
PostgreSQL: psql
For the PostgreSQL command-line tool psql,
Create database:
Create database user:
Switch to the database by logging into psql at the command line:
Oracle XE: sqlplus
For the Oracle XE command-line tool sqlplus,
Login in as sys user:
On initial setup, use the command:
after the initial setup, use the command:
Drop database:
To create the database, find the directory where Oracle XE is installed, and replace ORACLE_INSTALL below with that directory name:
Switch to the database by logging into sqlplus at the command line. The connection argument to sqlplus has the form username/password@hostname/dbname
The hostname value should match the HOST value set in file <oracle_home>/network/admin/listener.ora. It may also be necessary to include the port number. Example, localhost:1521
Setting connection info in the interface
Once the database has been set up, save the connection info in the tasks interface. For instructions on how to do this, see Tasks Interface -> Tasks Tabs -> DB Settings in this guide.
Creating tables
The database tables will automatically be created in the schema by the tasks application on the first successful connection attempt.
You can create the schema tables separately, or generate the sql file to create the database tables under the DB Actions tab in the interface.
The table creation scripts for MySQL, MySQL Inno DB, PostgreSQL, and Oracle XE are also available in a zip file here.