wordpress display posts by terms id or name

You can try this code from WordPress Docs https://developer.wordpress.org/reference/functions/query_posts/

$args = array(
    'post_type'=> 'movie',
    'actor'    => 'Bruce Campbell, Chuck Norris',
    'order'    => 'ASC'
);
query_posts( $args );

Then display it like

while(have_posts()) : the_post();
    <!-- your code here -->
endwhile;

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