NO PICKUP LINES! (I can't emphasize that enough!)
Be straightforward: "Hi, I live/work nearby, would you be interested in getting coffee sometime?" Or, if there's something to talk about -- produce section of the grocery store, museum, playing or watching sports, etc. -- then a simple, light question to see if the other person is receptive to talking to a stranger. If it becomes an actual conversation, that's a great start. "Gee, I really enjoyed talking with you. Would you be interested in going out to lunch/dinner/coffee/a glass of wine sometime?" And if the answer is 'no', well, you still had a nice time, right? And maybe you run into each other again in 3 or 6 months and it turns out maybe now the answer is 'sure, let's have lunch tomorrow'.
Just remember that the other person does not owe you ANYTHING -- not their time, or attention, or anything more than basic civility as long as you don't cross a line -- and that will come across in anything you do say to them.
_________________
When the sun rises, look for silent fading stars.