SQL query to return categories and category parents

Something like this should work:

select t.name cat, p.name parent 
from wp_terms t, wp_term_taxonomy tt, wp_terms p
where tt.term_id=t.term_id and tt.parent=p.term_id

(this only returns categories with a parent)

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