How do I safely upgrade xampp without losing database i have created?
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.