There are following database SQL query need to run
To change the base URLs, run the following SQL Query:
update core_config_data set value = 'http://mage2db.com/' where path = 'web/unsecure/base_url';
To change the secure base URLs, run the following SQL Query:
update core_config_data set value = 'https://mage2db.com/' where path = 'web/secure/base_url';