How to delete rows from custom table within a time interval?

I solved in this way

    $wpdb->query(
        $wpdb->prepare(
            "DELETE FROM $table_name WHERE Date < now() - INTERVAL 30 DAY")
    );

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