As a general rule, it is best not to connect the PC ground to power circuits which have their own ground. Two ways to accomplish this: one, use opto-isolation, or two, use a small relay powered from a floating supply, and rely on the isolation provided by the relay. Note that the relay supply must be a "floating" supply, with both output terminals not connected to the case or third prong on its line cord.
The base-to-emitter junction of the switching transistor effectively "shorts" the TTL output to ground, which is considered bad practice. If you put a base resistor there, then when the port pin is high, the current is limited so as to prevent heating in the TTL driver.