@Boryl the best approach is probably to use mysqldump to get a text file of your entire database contents, open it in a text editor to use find+replace, then re-import the sql file.
Note that Ghost prior to 4.0 stored URLs in the database as relative so there shouldn’t be any need to replace URLs if your domain has changed but there may be some cleanup needed if you’re changing subdirectories. In Ghost 4.0 onwards urls are stored as __GHOST_URL__/* in the database for faster transforms, those urls are always relative to your configured url so there should be less need (hopefully no need) for manual find+replace when changing subdirectory.
Thanks. I do not want to process entire database. Is there any command I can find a string text (URL) in posts content only and replace? I have found this, but do not know the Ghost’s tables and fields where post text content is.
UPDATE `table_name`
SET `field_name` = replace(same_field_name, 'unwanted_text', 'wanted_text')