How do I safely upgrade xampp without losing database i have created? Also when i try to upgrade the with older version being installed, i get this error that port is being used or similar sorts. Do I complete installation by uninstalling? 

I am searching for complete answer just to be sure about upgrading.
First thing is to listen to the doctors' motto - "Do no harm".

Take a backup of your database before doing anything else - that way, if you make a mistake, you can always retrace your steps and you won't have lost any important (or even unimportant) data.