I want to use a remote host for my magento 2. the problem is even if I have set the host to remote in env.php, it is still using localhost. it seems the value for the host is just ignored.
array ( 'model' => 'mysql4', 'engine' => 'innodb', 'initStatements' => 'SET NAMES utf8;', 'host' => 'my_remote_host', 'dbname' => 'my_db', 'username' => 'my_username', 'password' => 'my_password', 'active' => '1', ),
I have cleared the cache by using.
php bin/magento cache:flush
I have cleared the cache in browser too. It looks like my Magento 2 is simply ignore the value i set to the Host in env.php and keep using localhost as default.