Advanced Custom fields not available yet during publish_page action

ACF saves its data on the save_post action, which runs after a post or page status is transitioned to publish. If you want to access field data hook it to the save_post action instead.

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