Unable to save or update postmeta for custom post type via action using save_post hook

Try changing update_post_meta(get_the_ID(), $address, 'test'); to update_post_meta(get_the_ID(), 'address', 'test');

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