Remove action working on functions.php but not in a plugin. Why?

The include of custom code via theme is different from the including via plugin.
It is important, that you add a hook to include your custom source inside the plugin, like after_setup_theme, maybe with a low priority, after the default theme init his code.

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