2012-12-06 83 views
1

如何在vBulletin中設置從站數據庫配置?我這樣設置:如何在vBulletin中設置從站數據庫配置?

$ config ['Database'] ['dbtype'] ='mysql';

$ config ['Database'] ['dbname'] ='xyz';

$ config ['Database'] ['tableprefix'] ='vbulletin1_';

$ config ['Database'] ['technicalemail'] ='[email protected]';

$ config ['Database'] ['force_sql_mode'] = false;

$ config ['MasterServer'] ['servername'] ='xyz';

$ config ['MasterServer'] ['port'] = 3306;

$ config ['MasterServer'] ['username'] ='x';

$ config ['MasterServer'] ['password'] ='xxxx';

$ config ['MasterServer'] ['usepconnect'] = 0;

$ config ['SlaveServer'] ['servername'] ='abc';

$ config ['SlaveServer'] ['port'] = 3306;

$ config ['SlaveServer'] ['username'] ='a';

$ config ['SlaveServer'] ['password'] ='xxxx';

$ config ['SlaveServer'] ['usepconnect'] = 0;

回答

0

這僅取決於您的從屬DB憑證。和「從數據庫」意味着你已經在你的主機上覆制了數據庫(vBulletin無法做到這一點,它應該由你的網絡服務器自動完成)。所以,如果你沒有複製的數據庫,你不應該建立從數據庫。

主從設置是爲了提高性能。您將寫查詢發送到主服務器,並將大多數查詢發送到從服務器。它有助於提高性能,因爲寫查詢根據數據庫表類型鎖定表/行,讀取操作不會。 vBulletin forum

相關問題