Change Magento base URLs in MySQL is really simple
If you’re unable to change Magento base URLs from the admin panel because you don’t have access to your Magento admin, here’s how you could change Magento base URLs in MySQL:
This post will help you update your URL after you move your site from one environment to another or when you don’t have access to the admin panel. You will need access to MySQL database and you can use MyPHPAdmin.
1) Open up phpMyAdmin.
2) Click on the name of your magento database.
3) Click on the SQL tab, and in the text area, run the following command:
Go back to your magento front-end and try the new url
update core_config_data set value = 'http://demourl.com/' where path = 'web/unsecure/base_url';
update core_config_data set value = 'http://demourl.com/' where path = 'web/secure/base_url';