How to redirect to home page after registration?

Instead of your code why don’t you try which in the codex example.

This simple example will redirect a user to the home_url() upon successful registration.

add_filter( 'registration_redirect', 'my_redirect_home' );
function my_redirect_home( $registration_redirect ) {
    return home_url();
}

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