[英]Unable to connect to MongoDB: Failed to connect to: 333.33.333.333:27017: Connection refused
Hello am trying to connect mongodb on live server using codeigniter an getting following error . 您好,正在尝试使用codeigniter在实时服务器上连接mongodb,但出现以下错误。
Unable to connect to MongoDB: Failed to connect to: Connection refused 无法连接到MongoDB:无法连接:连接被拒绝
Everything working fine on my local machine. 在我的本地计算机上一切正常。
here is my connection setting in mongo_db.php file in config folder 这是我在config文件夹中的mongo_db.php文件中的连接设置
$config['mongo_db']['default']['no_auth'] = FALSE;
$config['mongo_db']['default']['hostname'] = '333.33.333.333';
$config['mongo_db']['default']['port'] = '27017';
$config['mongo_db']['default']['username'] = 'abcd';
$config['mongo_db']['default']['password'] = 'abcdef';
$config['mongo_db']['default']['database'] = 'db_seeker';
$config['mongo_db']['default']['db_debug'] = TRUE;
$config['mongo_db']['default']['return_as'] = 'array';
$config['mongo_db']['default']['write_concerns'] = (int)1;
$config['mongo_db']['default']['journal'] = TRUE;
$config['mongo_db']['default']['read_preference'] = NULL;
$config['mongo_db']['default']['read_preference_tags'] = NULL;
333.33.333.333不是有效的IP,因此我怀疑您的服务器已绑定到该IP
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.