修改以下配置:$cfgServers[1]['host'] = 'localhost'; // MySQL hostna

1个回答

  • 看情况 有着应当属于网站的数据库配置项,你需要知道的有这几个

    $cfgServers[1]['host'] = 'localhost'; // MYSQL数据库连接地址

    $cfgServers[1]['port'] = ''; // MySQL数据库连接端口,默认为3306

    $cfgServers[1]['user'] = 'alintest'; // MySQL数据库用户名

    $cfgServers[1]['password'] = 'alintest'; // MySQL数据库密码

    $cfgServers[1]['only_db'] = 'alintest'; // 数据库连接成功后你要使用到的数据库名

    只要配置好这几项,一般你的网站就可以成功连接到数据库了