Order custom post type by taxonomy

Add Meta key value:

function my_pre_get_posts( $query ) {

    // do not modify queries in the admin
    if( is_admin() ) {
        return $query;
    }

    // only modify queries for 'model' post type
    if ( $query->is_tax( 'model-year' ) && $query->is_main_query() ) {
        $query->set('orderby', 'meta_value'); 

        // Add Metakey ( "Custome field name" );  
        $query->set('meta_key', 'order_number');    
        $query->set('order', 'ASC'); 
    }
    return $query;
}
add_action('pre_get_posts', 'my_pre_get_posts');

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