there is only 1 "Rule" I apply to mid pocket pairs. I always open raise them, from any position if I am first in the pot. ALWAYS. that means, I never open limp them and I never open fold them. NEVER.
beyond that, it is so situational.
first consideration: stack size. If you are shortish stacked (under 25bb) the value of mid pocket pairs goes WAAAAAY up. You should be looking to get it all in at some point. raise pre, hope for a caller and get it in on the flop if no over cards, or maybe if only 1 over card. If there is 1 raiser ahead of you, you'll nearly always 3bet which will likely put you all in.
If you have a medium stack and there is a raiser ahead of you, you may now entertain the option of flat calling and seeing a flop. But 3betting isn't a terrible idea either.
If you have a deep stack, you basically want to set mine with mid pocket pairs up through about JJ. if you're first in the pot go ahead and raise, but if there are limpers or raisers ahead of you just call along and hope to flop a set or maybe an OESD with an overpair... (ex: you limp along with 88 and flop comes 567, you can play this hand somewhat strong and fast compared to 88 on a board of 56J).