Database configuration

From NComputing Knowledge Base
Revision as of 00:19, 15 June 2015 by Admin (talk | contribs)

Jump to: navigation, search

NoTouch Center stores its data into a SQL database. The primary database is MySQL, but we also support Oracle and Microsoft SQL Server. Both the NoTouch Center Windows installer and the Stratodesk Virtual Appliance come with MySQL included, so actually the fact that a database is used is transparent to you and you don't have to worry about that.

If, and only if, you want to use an external database, be it another MySQL that you have installed somewhere, or an existing instance of Oracle or Microsoft SQL server this information is for you.

External database preparation

NoTouch Center needs its own "database" (sometimes referred to as tablespace or schema), and a user account name and password that has all privileges in this database, including modifying table definitions. Some databases call this "DDL administration".

By default, we suggest a database name of "easyadmin", a username of "easyadmin", and a password of "easyadmin".

MySQL

In MySQL, the commands to create and prepare such a database are:

  create database easyadmin;
  grant all on easyadmin.* to 'easyadmin'@'localhost' identified by 'easyadmin';

Microsoft SQL Server

In MS SQL Server Studio, first create a user named "easyadmin". Then right-click on the "Databases" entry in the tree view, and select "Create Database". Assign a name for your database (we suggest "easyadmin") and make sure the user "easyadmin" is chosen as the owner of the database.


Database migration

Sometimes people have to move their database to a new server, for whatever reasons. In that case you need to let NoTouch Center know about the change so that it can connect to and use its database.

Please always use your database servers tool to import and export. So for example if you move the NoTouch Center database from an older MS SQL server to a newer version on a different server, properly export it on the old one using the Microsoft SQL Server tools and and import it on the new one. Make sure user account, password and privileges are intact on the new system as well.

NoTouch Center does not support cross-migration from Oracle to MS SQL or vice-versa (there may be third-party tools though), but you can migrate both formats to MySQL. In fact, this is done automatically, if you migrate standalone NoTouch Center into Virtual Appliance.

If you have moved your database to a new server, please change NoTouch Center configuration according to the information below in this article.

NoTouch Center on Windows with an external database

Installation with an external database

When installing NoTouch Center with the easy Windows installer, you have the option to deselect MySQL during installation. If you disable the checkbox, MySQL will not be installed.

Subsequently, during first connect with your browser to NoTouch Center, a dialog box will appear asking for a working database configuration. Please fill in the data to complete the installation.

Changing database configuration

  1. Log in to the Windows system locally or via RDP or any desktop sharing product
  2. Stop NoTouch Center service with the standard Windows services dialog
  3. Edit the file <Program Files>\Stratodesk\NoTouch Center\lmc\etc\tcmgr.properties with a standard text editor like Notepad
  4. Change these values:
    • lmc.dbhost
    • lmc.dbname
    • lmc.dbtype
      • mysql for MySQL
      • jtds for MS-SQL
      • oracle for Oracle
    • If necessary, also lmc.dbport (Port number; 0 should be fine), lmc.dbuser (database username), lmc.dbpass (database password)
  5. Save and exit the text editor
  6. Start the NoTouch Center service

Stratodesk Virtual Appliance

VA deployment with an external database

  1. Deploy the Stratodesk Virtual Appliance as documented.
  2. Login to the Virtual Appliance via Secure Shell and gain root privileges as described
  3. Stop both the NoTouch Center service and the MySQL services by executing these command:
    • stop center
    • stop mysql
  4. Make sure MySQL stays deactivated:
    • echo "manual" >> /etc/init/mysql.override
  5. Start the NoTouch Center service again, intentionally making it fail to connect to its database:
    • start center
  6. Connect with your browser to NoTouch Center. A dialog box will appear asking for a working database configuration. Please fill in the data to complete the installation.

Changing VA NoTouch Center database configuration

  1. Login to the Virtual Appliance via Secure Shell and gain root privileges
  2. Stop the NoTouch Center service by executing this command:
    • stop center
  3. Open the NoTouch Center configuration file:
    • nano /opt/center/etc/tcmgr.properties
  4. Change these values:
    • lmc.dbhost
    • lmc.dbname
    • lmc.dbtype
      • mysql for MySQL
      • jtds for MS-SQL
      • oracle for Oracle
    • If necessary, also lmc.dbport (Port number; 0 should be fine), lmc.dbuser (database username), lmc.dbpass (database password)
  5. Save and exit by pressing Ctrl-X
  6. Restart NoTouch Center:
    • start center
  7. Check the screen for potential error messages