Magento 2.0 similar to Magento 1.x stores shop root URL in the core_config_data database table.
The record paths are same: web/unsecure/base_url и web/secure/base_url.
So you can change root URL by SQL query:
UPDATE core_config_data
SET value = 'http://example.ru/'
WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url');
It is sufficient for Magento 1.x but not for Magento 2.0.
Magento 2.0 for some strange purpose additionally stores root URL in the third path: design/head/includes
Of course, it is a good idea to update it with the new path as some custom script/css tags with hardcoded urls in the header could be affected. The suggested query should take this in charge very well in most cases. One might also take a look at it manually as this is a custom field and the url may not be formatted exactly the same (i.e. http / https). It might even be better to use relative urls for head tags pointing to the actual website, this way there will be no need to bother about moving the site to a different domain.