Hook after all metadata are set is triggering several time

Add remove_action( 'save_post', 'my_save_post_function', 10, 3 ); inside your my_save_post_function before doing any update.

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