WPDB update row with != in where clause

Here is exmaple code,You will change as per your requirement

$wpdb->query(
    "
    UPDATE $wpdb->posts 
    SET post_parent = 7
    WHERE ID = 15 
        AND post_status="static"
    "
);

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