How to make an sql query to exclude everything but custom taxonomy terms in table wp_terms?

If you take a look at get_terms() documentation it accepts search argument, which will perform LIKE match against term name and slug.

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