Table prefix

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
hjweb
Posts: 2
Joined: 14 Jan 2009, 13:34

Table prefix

Post 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
NT
Posts: 21
Joined: 30 Oct 2007, 13:35

Re: Table prefix

Post 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
deboutv
Posts: 507
Joined: 15 Jan 2007, 14:31
Location: La Ciotat, FRANCE
Contact:

Re: Table prefix

Post 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.
Want more plugins to customize Mantis?
=> http://deboutv.free.fr/mantis/

Mantis: 1.1.0, 1.1.0a2
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux
hjweb
Posts: 2
Joined: 14 Jan 2009, 13:34

Re: Table prefix

Post 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.
Post Reply