Asume you have created a new database at your new hosting company, and then imported your sql file.
You can ftp into your host, change /library/config.php and enter the new information there.
<?php
$config['db']['host'] = 'sql_server';
$config['db']['port'] = 'port_nr';
$config['db']['username'] = 'username';
$config['db']['password'] = 'password';
$config['db']['dbname'] = 'databasename';
$config['superAdmins'] = '1';
With that the forum should read your database information again.