Deleting WordPress posts and media files based on author via MYSQL database

This is what I wanted to achieve, I hope it helps somebody

DELETE wp_posts FROM wp_posts 
INNER JOIN wp_users ON wp_posts.post_author = wp_users.ID 
WHERE post_author = 1 AND post_date BETWEEN '2024-01-01 00:00:00' AND '2024-03-28 23:59:59';

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