Can WP-CLI modify database connection details in existing wp-config file?

You can use wp config set to update any existing value in wp-config or to add a new value:

wp config set DB_NAME some_db_name
wp config set DB_USER some_db_username
wp config set DB_PASSWORD you_secret_value_pass

See https://developer.wordpress.org/cli/commands/config/set/

Keep in mind that values are case sensitive, so if you do wp config set db_name some-db, it will add a NEW value rather than update the value for DB_NAME.

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