Hello am trying to connect mongodb on live server using codeigniter an getting following error .
Unable to connect to MongoDB: Failed to connect to: Connection refused
Everything working fine on my local machine.
here is my connection setting in mongo_db.php file in config folder
$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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.