You have to weld. TIG is prefered for best fusion, MIG is OK if you have plenty of amperage to apply. If the cylinder is a welded-type, you can extend the ram and optionally fill it with oil, and do not cap the ports, and weld away, keeping the chromed rod cool with a wet rag wrapped on. The other end, the base end, can also be welded onto while the rod is extended, and optionally with oil inside. The oil is discarded after welding. If the cylinder is a tie-rod type, the base is cast. I do not know how to weld the cast reliably, especially for the forces you expect to put on a hydraulic cylinder. Even on a cast tie-rod cylinder, you can weld the rod end if you keep it from overheating with the wet rag idea, and cooling often. These are my methods gleaned from the experience here on TBN, and from farming days. Other readers may have other ideas and correct my writeup. This stuff has worked for me in the past. Good luck.