Display a random customposttype2 excerpt in single-custompostype1.php that shares same taxonomy

You need to get_the_category() of the product post and then set category in get_posts() to that category’s $category->term_id.

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