Database connectivity issue in Magento 2.1

I am trying to connect to magento database of another system with the following configuration in app/etc/env.php

  array (     'host' => '192.168.1.172',     'dbname' => 'datacenter',     'username' => 'root',     'password' => 'root',     'active' => '1',   ), 

But i keep getting the below error, is there anything i can do to fix it? Your inputs are much appreciated.

2 exception(s): Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2002] Connection refused Exception #1 (PDOException): SQLSTATE[HY000] [2002] Connection refused