Pagination url canonical problem

You have to install Yoast SEO and then add to functions.php:

function return_canon () {
$canon_page = get_pagenum_link(1);
return $canon_page;
}

function canon_paged() {
if (is_paged()) {
add_filter( 'wpseo_canonical', 'return_canon' );
}
}
add_filter('wpseo_head','canon_paged');

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