您需要修改wp配置。php。您可以在那里设置DB连接。
查找类似以下内容的部分:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define(\'DB_NAME\', \'\');
/** MySQL database username */
define(\'DB_USER\', \'\');
/** MySQL database password */
define(\'DB_PASSWORD\', \'\');
/** MySQL hostname */
define(\'DB_HOST\', \'\');
/** Database Charset to use in creating database tables. */
define(\'DB_CHARSET\', \'utf8\');
/** The Database Collate type. Don\'t change this if in doubt. */
define(\'DB_COLLATE\', \'\');