- 论坛徽章:
- 0
|
我装了两台服务器(AS4.0),一台做页面,一台做数据库,两台服务器都是双网卡,一个对外IP和一个对内IP,用一根交叉线把两个内网卡组成局域网,数据库为192.168.0.2,页面为192.168.0.1,在页面服务器上可以ping通192.168.0.1,但不能数据库,如下:
$cfg['Servers'][$i]['host'] = '内网IP'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = '3306'; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables)
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
如果把内网IP改成外网IP就可以连上,这是怎么回事呢?请高手们指点下 |
|