Problem using $var for shortcode attr value

I would simply find the function that the shortcode is pointing to and call it directly with your variable. It seems like there would be less room for error.

example:

actual_products_shortcode_function($mycat);

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