changing post type in loop query

To have the first code block to work on a secondary query, you’d need:

function customize_customtaxonomy_query ( $query ) {
    $query->set('post_type', array('business') );
    // return $query; // not necessary; actions do not return anything
}
add_action( 'pre_get_posts', 'customize_customtaxonomy_query' );
$q = new WP_Query($args);

And you should remove it afterwards so that it doesn’t interfere with other loops.

To have that filter work on the main query it needs to be applied before the main query runs, which means (usually) it needs to be in functions.php or a plugin file.

However, if you are creating a secondary Loop (can’t tell if you are) then the filter looks like overkill. Just pass the arguments you want. Untested, but something like this:

$args = array_merge( $wp_query->query_vars, array( 'post_type' => 'business' ) );
$q = new WP_Query( $args );

That is a lot of guessing but I hope it helps.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)