How to make a strong connection when soldering wires together
Use heat shrink tubing to provide a strain relief to your solder connection.  Be sure to use the correct solder (electrical, not plumbing) and clean the joint with isopropyl alcohol prior to heat shrinking.