Using PC audio to listen to electrical noise on power line?
NEVER make a straight connection between mains power and any other device unless you 100% know what you're doing. Since you have to ask, I assume you lack the knowledge to work with mains voltage directly.

Indeed computers do not like straight connections to mains but computers that are blown up can be replaced. However, humans can die when connected to mains.

You will need to use a mains transformer, if you have an old mains adapter that supplies an AC voltage like 12V AC, this could be used safely. Adapters that output a DC voltage are NOT suitable for what you want.