Here is how you can update the SiteURL and Home URL in WordPress database using terminal and MySQL queries:
Log in to MySQL
mysql -u <username> -p
Select the database to update.
USE <database_name_dev>;
Run update query.
UPDATE wp_options SET option_value = replace(option_value, '<http://www.oldurl>', '<http://www.newurl>') WHERE option_name = 'home' OR option_name = 'siteurl';
And it’s done!