problem with register_activation_hook in plugin

register_activation_hook only fires when plugin is going to active.

You should use your function in add_action('admin_init','your_function_name').

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