Avatar

Multi-site capability (General)

by Auge ⌂, Thursday, December 07, 2017, 08:58 (2332 days ago) @ Micha

Hello

If yes, does it require several MySQL databases, or just one single database?


No, you can define a unique table prefix per installation.

As an amendment: If you prefer a common user database, you can specify the preferred user-data-table in config/db_settings.php after an additional installation.

db_settings.php of the first installation:

<?php
// Database host, mostly 'localhost':
$db_settings['host'] = 'localhost';
// Database name:
$db_settings['database'] = 'database123';
// Database user name:
$db_settings['user'] = 'user123';
// Database password:
$db_settings['password'] = 'password123';
// Database tables (normally not necessary to edit): 
$db_settings['settings_table'] =       'mlf2_settings';
$db_settings['forum_table'] =          'mlf2_entries';
$db_settings['category_table'] =       'mlf2_categories';
$db_settings['userdata_table'] =       'mlf2_userdata';
$db_settings['smilies_table'] =        'mlf2_smilies';
$db_settings['pages_table'] =          'mlf2_pages';
$db_settings['banlists_table'] =       'mlf2_banlists';
$db_settings['useronline_table'] =     'mlf2_useronline';
$db_settings['login_control_table'] =  'mlf2_logincontrol';
$db_settings['entry_cache_table'] =    'mlf2_entries_cache';
$db_settings['userdata_cache_table'] = 'mlf2_userdata_cache';
$db_settings['bookmark_table'] =       'mlf2_bookmarks';
$db_settings['read_status_table'] =    'mlf2_read_entries';
$db_settings['temp_infos_table'] =     'mlf2_temp_infos';
?>

db_settings.php of the second installation:

<?php
// Database host, mostly 'localhost':
$db_settings['host'] = 'localhost';
// Database name:
$db_settings['database'] = 'database123';
// Database user name:
$db_settings['user'] = 'user123';
// Database password:
$db_settings['password'] = 'password123';
// Database tables (normally not necessary to edit): 
$db_settings['settings_table'] =       'mlf21_settings';
$db_settings['forum_table'] =          'mlf21_entries';
$db_settings['category_table'] =       'mlf21_categories';
$db_settings['userdata_table'] =       'mlf2_userdata'; // common user data
$db_settings['smilies_table'] =        'mlf21_smilies';
$db_settings['pages_table'] =          'mlf21_pages';
$db_settings['banlists_table'] =       'mlf2_banlists'; // common banlists
$db_settings['useronline_table'] =     'mlf21_useronline';
$db_settings['login_control_table'] =  'mlf21_logincontrol';
$db_settings['entry_cache_table'] =    'mlf21_entries_cache';
$db_settings['userdata_cache_table'] = 'mlf2_userdata_cache'; // common user data cache
$db_settings['bookmark_table'] =       'mlf21_bookmarks';
$db_settings['read_status_table'] =    'mlf21_read_entries';
$db_settings['temp_infos_table'] =     'mlf21_temp_infos';
?>

With that settings the second installation will use the user- and the banlists of the first installation. You'll need different cookie prefixes, as Milo said.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread