Is it possible to activate page template without manually selecting it in wp-admin?

Presumably you are using wp_insert_post to create your pages. Having done so, do

update_post_meta($id, '_wp_page_template', 'my_template.php');

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