What does do_action(‘admin_init’); does actually?

What it does: It offers an action handler, a moment in run time to execute other functions.

So it is a hook for plugins and core functions. Removing all hooked functions or changing the core file will break WordPress.
If your plugin fails to work with it – fix the plugin.

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