Although there are wireless solutions available if mouse is required at a little distance from main computer, sometimes these may not work. Recently I have installed a DVR with USB mouse support and wanted a cost efficient solution using old broken phone charging USB cables. (pictures show completed project)
Step 1: Parts Requried
USB Type A port
5 hole by 7 hole veroboard piece
Broken USB phone charger cable (USB Type A to USB micro B)
Soldering iron and solder
Some foam and tape
Step 2: Making the Cable
Cut broken end, strip wires and tin them. Place USB port on piece of board so that it is supported with the piece of veroboard. Wiring can be looked up from the internet.Solder port and wires so as to make a straight USB Type A male to female cable. I place pieces of foam on top and bottom and wrapped it with tape to secure it from dust etc.
I have made two of these and USB mouse works even when connected at the end of second cable (about 4 meters in total).
I hope you like it.