how many years was copper mined
at least 5000 years. copper was necessary for the bronze age to come into existence.
Excavations and archaeological finds suggest that copper has been mined since at least 4500 BC - i.e. 6000+ years.
Your use of the word mined poses difficulties. Most metals were worked from ores taken from surface outcrops, although this did lead to digging. The use of copper marks the beginning of the Bronze Age, when ancient people found a use for the alloy of copper and tin. This suggests that these metals were known before this and then some genius mixed them to make bronze. Before 3000BCE bronze was used in the area of the Aegean, Turkestan and India. By 2000BCE the knowledge had spread to China and Britain which had a ready supply of tin. Save for two localized working sites in Mexico and Peru none of the achievements of the Bronze Age reached the New World until historical times. The same was the case with Oceania and Africa south of the Sahara. Read Man makes himself by Gordon Childe. This is a fascinating book.
copper is one of the oldest metals worked by man. it is known to have been in use by the Sumerians in southern Mesopotamia as early as 3500 B.C. and to have become more common by 3000 B.C. around 2500 B.C. copper mining began in Cyprus, the island that gave its name to the metal.