Which file needs to change to update database when transfer a local Magento install onto live server?

  • app/etc/config.xml
  • app/db/config.xml
  • app/etc/local.xml
  • app/code/core/db/local.xml

stackoverflow.com/a/1763705

Magento will work if you move the contents of config.xml to local.xml and remove entirely config.xml.
This separation exists for a reason.
config.xml contains (let's call them) settings that do not depend on the environment where Magento is installed.
local.xml contains environment dependent settings: DB connection, cache engine, encryption key, session handler.
This way a part of the settings can be versioned (config.xml) and you only have a small file depending on the environment.
magento.stackexchange.com/a/3962