Using $wpdb generates DB error

its a syntax error according to error message. starements like below might work for you.

global $wpdb;
$wpdb->show_errors();
$tableCustom = 'join_users_defis';

$sql = "SELECT * FROM {$wpdb->postmeta}";
$requeteAffichage = $wpdb->get_row( $sql );

//or $requeteAffichage = $wpdb->get_results( $sql );

var_dump($requeteAffichage);

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