Create page when a new site in multisite network is created?

After the page is created and you have its ID, and before you restore_current_blog() you do this:

update_post_meta( $page_id, '_wp_page_template', 'your-template-file.php' );

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