How to query posts with featured images

You’ve provided the answer to your own question, query for meta key _thumbnail_id to get posts with a featured image:

$args = array(
    'meta_key' => '_thumbnail_id',
    'posts_per_page' => 3
);
$latest_with_thumbnails = new WP_Query( $args );

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