This is a very simple method, and for me (as a SysAdmin) it's very practical as I usually make things through SSH terminal.
It's important to say that everything (including text inside posts) that matches the find string WILL BE REPLACED!
For me it's never been a problem so far, but one never knows
First we generate the dump itself, for example:
mysqldump -umyuser -pmypass mydatabase > mydumpfile.sql
Now the find/replace command
sed -e 's/myolddomain.com/mynewdomain.com/gi' mydumpfile.sql -i
And now reimport the dump, like:
mysql -umyuser -pmypass mydatabase < mydumpfile.sql
And that's all.