As you can clearly see the constructor of wpdb class first parameter is the dbuser then password then db name and last is host
function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
register_shutdown_function( array( $this, '__destruct' ) );
if ( WP_DEBUG )
$this->show_errors();
$this->init_charset();
$this->dbuser = $dbuser;
$this->dbpassword = $dbpassword;
$this->dbname = $dbname;
$this->dbhost = $dbhost;
$this->db_connect();
}
In your code you have pass the parameters in the wrong sequence
$forum_db = new wpdb($dbname, $dbuser, $dbpasswd, $dbhost);
shouldd be
$forum_db = new wpdb($dbuser, $dbpasswd, $dbname , $dbhost);
And to view the errors you can use $forum_db->show_errors();
or $forum_db->print_error();