I've never tried running MySQL on a different port but it looks like this file - a2billing/admin/lib/iam_csvdump.php is being used to establish the database connection for CSV exports.
My guess would be it's only picking up the hostname, not the port from the config file.
Maybe here -
272 if(!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host))
you could try -
272 if(!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host:PORT-NUMBER))
but ... back it up and don't blame me
or maybe wait for someone that knows what the code does ...