Hi,
> database imported overwrote the database created in my localhost because it had the same name.
Almost any name can be given to a database, and there is no requirement that the name be identical to the ServerName of the VirtualHost.
Then, the relationship between the VirtualHost and its database will be done in the VirtualHost configuration file where we will put for example: $dbname = 'name_of_my_database';, that's why we can choose the name we want.
Nevertheless, if you have several local sites, to find your way around more easily, you usually give the name of the site to the database.
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons