I finally got around to doing this task and I noticed that replacing the URL via
UPDATE forums_posts SET post = REPLACE(post, 'olddomain.com', 'newdomain.com');
will not entirely solve my problem since I also have updated the URL structure of members:
The original structure
https://www.website.com/profile/22355-username/
My modified structure
https://www.website.com/p22355/username/
Therefore I should run a more complex command which would also shorten the word profile to letter p, when remove slash and replace - symbol into / after the number. I can't even begin to think how to google that. Would there be an expert who could provide a command which would replace:
https://www.website.com/profile/22355-username/ into https://www.website.com/p22355/username/
@CoffeeCake @bfarber