httpd服务器搭建discuz
第一步、数据库的配置
create database discuz;
grant all privileges on discuz.* to 'discuz'@'localhost' identified by "admin123";
grant all privileges on discuz.* to 'discuz'@'127.0.0.1' identified by "admin123";
grant all privileges on discuz.* to 'discuz'@'192.168.%' identified by "admin123";
flush privileges;
第二步、discuz配置文件相关配置
$_config['db'][1]['dbhost'] = 'localhost';
$_config['db'][1]['dbuser'] = 'discuz';
$_config['db'][1]['dbpw'] = 'admin123';
$_config['db'][1]['dbcharset'] = 'utf8';
$_config['db'][1]['pconnect'] = 0;
$_config['db'][1]['dbname'] = 'discuz';
$_config['db'][1]['tablepre'] = 'pre_';
upload/config/config_ucenter_default.php
define('UC_CONNECT', 'mysql'); // 连接 UCenter 的方式: mysql/NULL, 默认为空时为 fscoketopen(), mysql 是直接连接的数据库, 为了效率, 建议采用 mysql
// 数据库相关 (mysql 连接时)
define('UC_DBHOST', 'localhost'); // UCenter 数据库主机
define('UC_DBUSER', 'discuz'); // UCenter 数据库用户名
define('UC_DBPW', 'admin123'); // UCenter 数据库密码
define('UC_DBNAME', 'discuz'); // UCenter 数据库名称
define('UC_DBCHARSET', 'utf8'); // UCenter 数据库字符集
define('UC_DBTABLEPRE', '`ucenter`.uc_'); // UCenter 数据库表前缀
define('UC_DBCONNECT', '0'); // UCenter 数据库持久连接 0=关闭, 1=打开
chmod 757 -R config data uc_server uc_client