Update WordPress URL command line

username@[~/Desktop]: mysql -u root -p databasename
Enter password:

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> UPDATE wp_options SET option_value = replace(option_value, 'https://www.oldurl', 'https://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

mysql> UPDATE wp_posts SET guid = replace(guid, 'https://www.oldurl','https://www.newurl');
Query OK, 1236 rows affected (0.01 sec)
Rows matched: 1236 Changed: 0 Warnings: 0

mysql> UPDATE wp_posts SET post_content = replace(post_content, 'https://www.oldurl', 'https://www.newurl');
Query OK, 1236 rows affected (0.05 sec)
Rows matched: 1236 Changed: 0 Warnings: 0

mysql> UPDATE wp_postmeta SET meta_value = replace(meta_value, 'https://www.oldurl','https://www.newurl');g
Query OK, 999 rows affected (0.01 sec)
Rows matched: 999 Changed: 0 Warnings: 0