Selecting all posts from the children of a particular parent taxonomy

I think you’re way overcomplicating this. Use get_terms to get all taxonomy terms that are a child of a particular term via the child_of argument, then use that array with a WP_Query tax query, no custom SQL queries necessary.

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