Can you re-install MYSQL on an ubuntu server, without deleting the created databases, privileges and other settings? Thank you.
Pl. clarify what do you mean by 'posting a database on website' !
I suggest you need to get some insight about three tiers of such project.
1) Database tier,
2) Business logic tier,
3) UI tier.
Since you say that you have setup MySQL, Apache web server and phpMyAdmin, you seem to know how to do it.
In a commercial business app, typically hosting is done on own server(s) of an organisation (with advanced approaches such as mirroring, load balancing, optimizing, etc.)
If it is a small organisation, hosting is done on leased server space / cloud hosting.
It would help us understand your question better (and answer it in a better way) if you can give more details.