How to delete images from database with product

I’d first get the attachment ID and with the attachment ID you could use wp_delete_attachment($att_id)

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