Here is my function for external database connection and using connection factory class to create connection, it is working fine in 2.3.3. //use Magento\Framework\App\ResourceConnection\ConnectionFactory;
public function getConnection(){
$db = $this->connectionFactory->create(
[
'host' => XX.XXX.XXX.X,
'dbname' => 'dbname',
'username' => 'username',
'password' => 'password',
'active' => '1',
]
);
return $db;
}
However when i tested it in 2.3.4 i am getting this error
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
Exception #1 (PDOException): SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
Note: host is external IP of the database that i am using to connect.