The database won’t be in you htdocs.
Depending on your setup it maybe accessible via you web hosting panel. You should then be able to do an export via your CP or by using PHPmyadmin.
Once you recover your database you’ll need edit your ipconfig and run the IP setup so it upgrades the DB to the new version.
However, if your new IP install is on the same server/hosting plan then all you should need to do is edit your ipconfig to point to the previous DB then run setup.