Product SiteDocumentation Site

5.2. Database

The database settings must be set in order for the package to work properly. These settings should be provided to you by your system administrator or your hosting company.
$g_hostname
Host name or connection string for Database server. The default value is localhost. For MySql, this should be hostname or hostname:port (e.g. localhost:3306).
$g_db_username
User name to use for connecting to the database. The user needs to have read/write access to the MantisBT database. The default user name is "root".
$g_db_password
Password for the specified user name. The default password is empty.
$g_database_name
Name of database that contains MantisBT tables. The default name is 'bugtracker'.
$g_db_type
The supported database types are listed in the table below.
The PHP extension corresponding to the selected type must be enabled (see also Section 2.2.2.1, “Versions compatibility table”).
RDBMSdb_type (ADOdb)PHP extensionComments
MySQLmysqlimysqlidefault
PostgreSQLpgsqlpgsql 
MS SQL Servermssqlnativesqlsrv 
Oracleoci8oci8 
MantisBT allows administrators to configure a prefix and a suffix for its tables. This is enables multiple MantisBT installation in the same database or schema.

Warning

Use of long strings for these configuration options may cause issues on RDBMS restricting the size of its identifiers, such as Oracle (which imposed a maximum size of 30 characters until version 12.1; starting with 12cR2 this limit has been increased to 128).
$g_db_table_prefix
Specifies the prefix to be used for all table names. The default value is 'mantis'.
The prefix can be used to help make sure table names are unique. This is useful for users who are limited to a single database or schema.
$g_db_table_suffix
Specifies the prefix to be appended to all table names. The default value is 'table'.
The suffix can be used to help make sure table names are unique. This is useful for users who are limited to one database.
$g_db_table_plugin_prefix
Specifies the prefix to be used to differentiate tables belonging to a plugin's schema from MantisBT's base tables. The default value is 'plugin'.
Plugin table names are built using the plugin's basename, e.g. for a table named 'foo' in the 'Example' plugin (with default values for prefixes and suffix), the physical table name would be mantis_plugin_Example_foo_table.