(incase some of the links reference a www.yourdomain.com)
NB: Try to make sure there are no
/'s on the end. Wordpress doesn't use these on a few of the links, and sometimes this will stop the following commands overwriting what they need to.
To use this SQL, open up PHPMyAdmin or similar and then click on your database. One of the tabs at the top should be called SQL. If you click this, you will be shown a text input area where you can paste in this code.