echo current taxonomy id for this loop?

In your foreach loop, the current term you are iterating is $tax_term:

foreach ($tax_terms as $tax_term) {

so within that block, the term’s ID is $tax_term->term_id:

<div id="<?php echo $tax_term->term_id; ?>">

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