How get permalink for the current category or tag?

get_queried_object will give you the current term object being viewed. You can pass that directly to get_term_link as the first argument.

$url = get_term_link( get_queried_object() );

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