What is the equivalent of get_user_option for saving options?

You can use update_user_option to update user options.
Read more here:
https://developer.wordpress.org/reference/functions/update_user_option/

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