How do I assign an attachment to a post using only the REST API?

If you look at the documentation for the media endpoint, you’ll see there’s a field, post, that you can use to attach media to a post using its ID.

post The ID for the associated post of the attachment.

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