How to make “Blog pages show at most” setting not affect custom queries

If you’re creating your own custom WP_Query queries, you can use the posts_per_page parameter:

$args = array( 
    // ...
    'posts_per_page' => $some_number,
    //...
);
$my_query = new WP_Query( $args );

If you want all the posts, use -1 as your $some_number.

Reference

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