How to define a term for custom taxonomy

A category is just a taxonomy. And taxonomies are made up of terms. You’ll need to set the post’s terms via wp_set_post_terms.

This should be fairly simple:

wp_set_post_terms( '42', array( 'term', 'terms', 'terms' ), 'q-categories' );

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