Page 1 of 1

Table prefix

Posted: 14 Jan 2009, 14:11
by hjweb
According to this page, the prefix of tables in Mantis can be changed.

I have only one database and want to install Mantis at least 2 times.
There should be a file in doc/db_generate.sql, but there is no such file.

I'm using Mantis 1.1.6
Got it working with the normal settings and got tabels like: mantis_user_table, but would like to get another word where "mantis" stands.

I hope one of you can help me change the prefix.

Kinds regards,

HJweb

Re: Table prefix

Posted: 17 Jan 2009, 12:17
by NT
Hi

In your config_inc.php file add the following:-

Code: Select all

	
$g_db_table_prefix		= 'newprefix';
Replacing 'newprefix' with whatever you want your table prefix to be.

You could also change the table suffix from '_table' to by adding:-

Code: Select all

	
$g_db_table_suffix		= '_newsuffix';
Nick

Re: Table prefix

Posted: 19 Jan 2009, 07:50
by deboutv
By the way it is better to have an underscore at the end of the prefix 'newprefix_'. With PHPMyAdmin, you will be able to display all the tables with the same prefix:

Without '_' at the end you have this:
- mantis_user_table
- mantis_user_pref_table
- newprefix_user_table
- newprefix_user_pref_table

With '_' at the end:
+ mantis
+ newprefix

And if you click on the + you have the full list of tables.

Re: Table prefix

Posted: 19 Jan 2009, 11:59
by hjweb
Yes!

Thanks a lot for the help.

I took both of your tips in consideration and it worked! :D
(not that I had doubts ofcourse :wink: )

Thank you very much! I now can install more servers on one database.