Wrong post ID in meta box callback

If you remove the line global $post; (and really you should remove it), there is no reason this shouldn’t work, according to the official documentation, unless as @rudtek mentioned, you run a custom query somewhere and the $post has changed

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