1

如何在 vBulletin 中设置从属数据库配置?我是这样设置的:

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

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

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

$config['Database']['technicalemail'] = 'xyz@abc.com';

$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;

4

1 回答 1

0

这仅取决于您的从数据库凭据。而“从属数据库”意味着您已经在主机上复制了数据库(vBulletin 无法做到这一点,它应该由您的 Web 服务器自动完成)。因此,如果您没有复制数据库,则不应设置从数据库。

主从设置是为了性能。您将写入查询发送到主服务器,并将大多数读取查询发送到从服务器。它有助于提高性能,因为写入查询会根据数据库表类型锁定表/行,而读取不会。 vBulletin 论坛

于 2015-06-04T09:30:16.353 回答