What is the real purpose of the parameter $option_group in the function register_setting()?

The $option_group parameter of register_setting should match the $option_group parameter of settings_fields, which is typically used as part of creating a custom settings page.

When you use register settings with register_setting(), your registered settings are added to a global variable of allowed options, where they are grouped by the $option_group parameter. When you submit your settings page WordPress only updates the options for $_POST fields that match options found in the list of allowed options for the current group. The current group is determined by a hidden field that’s added by the settings_fields() function.

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