Modify wp headers on specific page

from How can I change HTTP headers only to posts of a specific category from a plugin:

add_action( 'template_redirect', 'update_header_cache' );
function update_header_cache() {
    if( is_single( 1234) ) {
        header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
        header('Pragma: no-cache');
        header('Expires: Thu, 01 Dec 1990 16:00:00 GMT');
    }
}

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