Database Settings

The Database dialog lets you specify the database, connection details, and perform a connection test.

Figure. Database dialog.

Field

Description

Primary Connection

This field specifies the complete connection string to the database source.

Enter the database name, server name, username and password for your database (your DB administrator should be able to provide these).

The file browser button to the right of the Database field is only active if SQLite or Firebird are chosen. SQLite is a file based database, and you can use the file browser to select explicitly the file containing your database.

When using Firebird, there are two possibilities:

  • The database is placed on the same (local) machine – fill in the Database field and leave blank the Server one.

  • The database is placed on a remote machine – fill in both Database and Server fields. For the Server field, use the usual syntax: server(:port).

Database Syntax

 

Choose the database type that corresponds to your database from the drop-down list.

Supported database types are:

  • MySQL

  • SQLite

  • Microsoft SQL

  • Oracle

  • Firebird

  • InterBase

  • Microsoft Access

Database Driver

Choose the DB driver that corresponds to your database.

ODBC - will work with all databases except for:

  • MySQL – select MySQL

  • SQLite – select SQLite

  • Firebird – select Firebird

Note: When configuring Oracle database driver, do not check the Enable Statement Caching option. Caching on the Oracle server is powerful enough.

Database History

Select a DB connection string from the list of previously used ones.

Test Connection (button)

Always perform the ODBC connection tests. If the test is successful, you have set all the information properly. If not, you have to make changes.

Step by step:

  1. Create a System DSN in the Control panel - Administrator Settings - ODBC Data Sources to connect to your DB. Make sure it is a System DSN and not a User DSN.
  2. Fill in the proper connection string. Test connection - use the Test Connection button.
  3. Click the OK button.

Warning: REMEMBER that IceWarp Server is a 32bit application, therefore it will not work with default x64 ODBC driver on 64bit OS. Run the 32bit Data Sources (ODBC) odbcad32.exe application located in WINDOWS\Syswow64 to set DSNs of IceWarp Server on 64bit system. 32bit and 64bit ODBC DSNs are being stored separately.
If you use 64bit IceWarp Server, it is necessary to add the 32bit version of libmysql.dll to WINDOWS\Syswow64.

Supported Databases

IceWarp Server always supports only official/stable releases of database engines:

  • ships with SQLite3 3.7.9 native support

  • supports MySQL versions up 5.1 and 5.5 via native driver

  • supports Firebird 2.1 via native driver

  • supports MS Access 2008, MS SQL 2005/2008, Oracle 11, InterBase, using ODBC or unixODBC (check version support with ODBC driver vendor).

Tip: IceWarp recommends using MySQL, Microsoft SQL or Oracle for large installations as these are more robust and capable of handling the increased traffic.

Database Charset

All databases, i.e.

  • Antispam

  • GroupWare

  • WebClient PDO

  • Accounts

should use the UTF8 character set. IceWarp Server uses UTF8, if any its database is set to use other character set (usually by default they use LATIN1) it causes issues.

Note: If you have used a database (created in MySQL as latin1) from an old IceWarp Server installation to a fresh installation (set to use UTF-8 for driver connections), you may experience problems with viewing data in the console, WebClient, etc. - diacritics shown incorrectly.
If this happens, migrate your data to UTF-8 (check MySQL manual) or, an easier way to get around, use API to change connection to use latin1.
So:
tool modify system C_System_MySQLDefaultCharset latin1
makes it to use latin1 instead of UTF-8.

Path Variables for MySQL and FireBird

When using either MySQL or FireBird databases, you have to take into account that these databases use own libraries installed into specific folders:

  • C:\Program Files\MySQL\bin for MySQL
  • C:\Program Files\FireBird\bin for FireBird

You have to use these folders and add the appropriate path to the system Path variable (Control panel - System - Advanced system settings - Advanced - Environment Variables - System Variables) - use semicolons to separate single paths.

Warning: Do not use different folders for these libraries as you could forget to upgrade them after database server upgrade!
You may need to reboot the server after the Path variable change - this depends on the OS you use.
The WebClient and GroupWare databases have to be case INSENSITIVE! Otherwise, WebClient will not work properly.