ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 如何修改Discuz数据库配置? 当您的数据库信息发生变化的时候,Discuz网站系统需要修改的位置三处: 1、路径:/wwwroot/config/config_global.php,修改如下的代码片段 ~~~ // ---------------------------- CONFIG DB ----------------------------- // $_config['db']['1']['dbhost'] = 'localhost'; $_config['db']['1']['dbuser'] = 'dbname'; $_config['db']['1']['dbpw'] = 'password; $_config['db']['1']['dbcharset'] = 'utf8'; $_config['db']['1']['pconnect'] = '0'; $_config['db']['1']['dbname'] = 'discuz'; $_config['db']['1']['tablepre'] = 'websoft9_'; $_config['db']['slave'] = ''; $_config['db']['common']['slave_except_table'] = ''; ~~~ 2、路径:/wwwroot/config/config_ucenter.php,修改如下的代码段 ~~~ define('UC_CONNECT', 'mysql'); define('UC_DBHOST', 'localhost'); define('UC_DBUSER', 'dbusername'); define('UC_DBPW', 'password'); define('UC_DBNAME', 'dbname'); define('UC_DBCHARSET', 'utf8'); ~~~ 3、路径:/wwwroot/uc_server/data/config.inc.php,修改如下的代码段 ~~~ define('UC_DBHOST', 'localhost'); define('UC_DBUSER', 'username'); define('UC_DBPW', 'password'); define('UC_DBNAME', 'dbname'); ~~~