Magento is using more then 1 config. (in ex. joomla is using one file). You must set database in /etc/local.xml
after this, on your hosting database you must change urls in table core_config_data. There are two rows :
web/secure/base_url
web/unsecure/base_url
Urls must by in format http://www.mystore.com/
and after this you must clear cache – delete content of directory var/cache/
have fun
Tags: how to, localhost, magento, moving, webhosting