Function not working on any file other than the main plugin file

I guess you should be using register_activation_hook() with the full path including filename, not just the path:

register_activation_hook( plugin_dir_path(__FILE__) . 'test-plugin.php', 'enable_user_registration' );

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