It's concerning that the pain is not on the mole itself if the two are connected somehow. It's also concerning there is a lump/swelling there, too. That being said it's only concerning because we don't know what it is. So you'll need to find out. This could be a cyst or lipoma coincidentally next to the mole, or something more serious...we just don't know.
I agree with 2017mary, go to a dermatologist as soon as possible. They might know right away by palpating or aspirating it, Or they may have to biopsy it. Good luck.
If you go to a dermatologist they biopsy it. Depending on how big it is they can take the entire thing off right at your appointment, then within a week you'll get biopsy results. I've had tons of moles removed, it isn't too painful and you can definitely take some Tylenol before your appointment. There aren't any specific tests to ask for other than a biopsy. Don't hesitate to get suspicious moles checked. I had skin cancer at 35. It is highly treatable when caught early. They can guess if it's cancer or not by looking at it, but the only way to know for sure is a biopsy.