You also need to change URLs in theme options, which include options that set the URLs of header images, and URLs in widget data, as well as URLs in plugin options. Some of these URLs are relative, but many are absolute.
Best thing to do is use a tool that finds/replaces URLs all through the database and correctly deserializes/reserializes php data, such as WordPress Serialized PHP Search Replace Tool.
Some themes do not correctly serialize data, so sometimes a theme will lose all option and widget data when using the tool above. But this is a fault with the theme. All themes that I have come across in the WordPress directory, as well as from reputable companies such as StudioPress, correctly handle serialized php data, and there are no issues with theme data.
And some plugins – such as backup and security plugins – read the full server path when being activated – such as /server1/home/username/public_html/wp-content/plugins/aplugin/
– and those plugins will need to be reset manually on the new host. But usually, those plugins aren’t active anyway until the site is live.
See WordPress Serialized PHP Search Replace Tool
And for a full reference, see Moving WordPress « WordPress Codex.
If you do want to use MySQL queries as you mention in your question, you also need to change GUID’s and postmeta in addition to the query you have already used:
UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com/','http://www.newdomain.com/');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.olddomain.com/', 'http://www.newdomain.com/');