Yes, that is what you should do, remember before you do anything, make a forum and database back up, the database bacckup isnt really need it, but better safe than sorry.
When you use the repair_settings, below every path, SMF will try to detect your new path, 99% of the times that is correct, also, don't modify anything from the database settings, you will only have to edit the paths and urls.