内网3台电脑主机,ip:172.100.30.200/201/203 ,数据库在172.100.30.200这台主机上,现在通过配置database如下:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = '172.100.30.200';
$db['default']['username'] = 'root';
$db['default']['password'] = 'rroott';
$db['default']['dbdriver'] = 'mysql';
$db['default']['database'] = 'coresys';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
201和202 2台主机要调用200的数据库,问题是:出现了如下提示
A Database Error OccurredUnable to connect to your database server using the provided settings. Filename: D:\APMServ5.2.6\www\htdocs\ci_cmts\system\database\DB_driver.php Line Number: 124
172.100.30.200这台主机 数据库权限如下
file:///C:\Users\lenovo\AppData\Roaming\Tencent\Users\380615540\QQ\WinTemp\RichOle\S3RH9OXHEQH8Q]8P1JX{B0G.jpg
用户主机类型权限授权操作
root %全局 ALL PRIVILEGES 是
root 127.0.0.1全局 ALL PRIVILEGES 是
root 172.100.30.202全局 ALL PRIVILEGES 是
root localhost全局 ALL PRIVILEGES 是
root production全局 ALL PRIVILEGES 是
请各位大侠指教是否是设置除了问题?
|