It's good to acknowledge that you recognize customers and remember what they've bought. You could say something like:
- Hi! How have you been?
- Hi! Are you still using that tennis racket?
It's okay to acknowledge that it's been a while:
- Hi! Long time no see!
- Hi! It's been a while.
Don't be nosy. Don't be effusive. Don't say dear, honey, or any other term of endearment.
In the US, we often use first names. (In some cultures, that's rude.) There's a store I use a lot. I always say, "Hi, Frank!," and he always says, "Hi, Charlie!"
If I disappeared for a few years, Frank might say "Hi, Charlie! Where have you been?" But it depends on which customer. Frank knows that I like to gab.