2012-12-06 41 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

相关问题