How to make sure settings are not lost when plugin is updated?

How to make sure settings are not lost when plugin is updated?

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