How can I pass a variable set by ACF to header.php?

You can pass the post id as the 2nd argument on the_field.

global $post;
the_field('product_image', $post->ID);

or

the_field('product_image', get_the_ID());

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