For those of you with just a multimeter...
The +5v pin, data and clock pins will all show as having 5v when you check with a multimeter.
The data and clock pins have pull up resistors to +5v, the +5v pin doesn't.
This means if you connect a resistor between a clock or data pin, and measure the voltage, it will be pulled down, and the meter will show a lower voltage.
If you do this to the +5v pin, the voltage will remain at the same level as before.
The clock and data pins are electronically identical. If you cross them over the port won't work, but you won't damage it.
However if you try powering a keyboard/mouse from the pin then you might cause damage.
Armed with this knowledge:
1) Identify the GND/0V pin
One Multimeter lead on the case, power on, and check the voltage at each pin. The single pin that reads 0v is Ground/0V
2) Identify the +5v pin
One multimeter lead on the case, check and note the voltage on the 3 remaining pins and make a note of it.
Then get a resistor (anything between 1k and 4k7 should do), and figure out a way to connect it between the terminals of your multimeter.
Go back and measure the voltage on the 3 remaining pins, and note it.
One of the pins will show +5v with and without the resistor - that's your +5v pin
3) Work out the clock and data pins
Either:
Wire up a connector to suit the PCB end.
Solder the GND and +5v leads
Solder the two remaining wires
Plug in the keyboard and power up
See if the keyboard works (Hint, if all 3 LEDs flash, and the caps lock LED turns on/off when you hit caps lock - you're good)
If it doesn't, power off and reverse the clock and data wires.
Or:
Take your existing keyboard cable, and make sure that the GND and +5v wires are connected correctly (modify if required)
Do the test above.
If it fails, swap the clock and data wires at one end.
Keyboard and mouse mini-DIN sockets are wired identically, and can be sussed out in the same method, the only difference being that you'll have to boot to an OS with mouse support to test a mouse. If the keyboard and mouse headers are together and look identical, then it might be a good idea to work on the keyboard header first, because the mouse port will probably be the same.