How to change base url in Magento 2 Database

How to change base url in Magento 2 Database

1. Once you login in Mysql then run following query

2. Check it Existing Base URL

SELECT value FROM core_config_data WHERE path LIKE ‘web/unsecure/base%’;

SELECT value FROM core_config_data WHERE path LIKE ‘web/secure/base%’;
3. Update New Base URL
UPDATE core_config_data SET value = ‘http://www.test.com/’ WHERE path LIKE ‘web/unsecure/base_url’;

UPDATE core_config_data SET value = ‘https://www.test.com/’ WHERE path LIKE ‘web/secure/base_url’;

4. After udpate the base url , suggested to clear the var/cache , var/session folders.

Basically config values will be stored in cache.To reflect the updated values better clear the

cache & check.

“Save Rain Water, be Healthy.