It depends upon how permanent you mean and if you can heat the parts for disassembly if needed.
If it's really permanent, I have used a lot of Loctite 680 for larger threaded connections in critical applications, it hasn't failed yet. But assembly does require heating the threads until the adhesive lets go.
Prep is important, make sure the surfaces are clean, and if it's not ferrous metal there's an activator Henkel recommends, the instructions are on the website.