How to use the Term Object from a custom select field in a query

How to use the Term Object from a custom select field in a query

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