If this is a new board, and you are using usb keyboard and mouse, be sure the usb option is enabled in the bios. A few boards have the setting disabled at default; you have to use a ps2 keyboard to get in and change the setting. If this is an older board, check the device manager in the control panel to be sure the drivers for the keyboard and mouse are loaded. They are listed under "system" and "hardware". If the ports are physically damaged or you had a lightening strike, then the answer is no; ports are rarely able to be replaced and resoldered.
Actually they can be replaced most of the time, but it's usually not cost effective. And there's no guarantee that the problem is the ports and not the controller or some other wiring on the board.