magento 1.9 get current url via config-path {{config path="web/secure/base_url"}} code example
Example: change magento database url usimg musql
UPDATE core_config_data SET value = 'http://www.hypernode.com/' WHERE path LIKE 'web/unsecure/base_url';
UPDATE core_config_data SET value = 'https://www.hypernode.com/' WHERE path LIKE 'web/secure/base_url';