Please ensure me that I’m not crazy using the pre_get_posts [closed]

Perhaps you should try this:

function rpm_pre_get_post($query){
   if($query->is_main_query()){
        $query->set('meta_query', array(
               array(
                   'key' => 'parent-project',
                   'value' => 'Metro-E'
               )
           )
        );
    }
}
add_action( 'pre_get_posts', 'rpm_pre_get_post', 9999 );

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