Previous Topic

Next Topic

Book Contents

Book Index

Database Settings

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

database_settings

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 Admin should be able to provide these).

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

Backup connection

The backup connection string serves as a backup solution if the primary connection cannot be used. It has the same format as the Primary connection.

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

Each time a DB query should be performed, following logic is used:

  • If the DB connection is KO and it was a primary connection, try backup connection.
  • If the DB connection is KO and it was a backup connection, try primary connection – never do a loop!
  • If the DB connection is OK and it is a backup connection older than 5 minutes, destroy it and create a new connection. This new connection will be created using primary DB if possible.

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

Database History

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

Buttons

Field

Description

Create Tables

This button creates the required tables in the ODBC source. You have to create the right tables for every ODBC source.

Drop Tables

The created tables will be deleted from the ODBC source using this button.

Test Connection

Always perform the ODBC connection tests. If the test is successful you setup 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. Specify a backup connection if required. Test with the Test Connection button.
  3. Create the tables using the Create Tables button.
  4. Press the OK button.

 

exclamation_mark_small

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 MySQL with a native MySQL driver, it might be 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:

 

 

exclamation_mark_small

NOTE: MySQL Server version 5.1 can cause serious problems when used for WebClient database. WebClient should use MySQL Server version 5.0 or, in the case you want to use WebClient with MySQL 5.1, you have to use the libmysql.dll library from MySQL Server version 5.0. Otherwise, when attempting to log-in, you will obtain the Unable to reach server error message. It is a known php_pdo_mysql.dll versus libmysql.dll bug.

MySQL Server version 5.0 can be downloaded from http://downloads.mysql.com/archives.php?p=mysql-5.0.

Database Charset

All databases, i.e.

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_small

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:

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.

 

 

exclamation_mark_small

Do not use different folders for these libraries as you could forget to upgrade them after database server upgrade!

NOTES:

You may need to reboot the server after the Path variable change – this depends on the OS you use.

WebClient and GroupWare databases have to be case INSENSITIVE! Otherwise, WebClient will not work properly.

See Also

Shared Topics

DNS Records Configuration

Simple RegEx Tutorial

Server Variables

Bypassing Rules/Filters

Schedule

Domain Admin Rights

Select Accounts

php.user.ini Advantages

snmp-mib.txt File