The first is ungrammatical.
The second is terse and unfriendly - even rude.
On meeting somebody new, say 'Hello, I'm John. How are you?'
If you say this in a friendly manner and with a smile, the other person will respond 'Hi, my name's Alphonse - nice to meet you'.
- For Teachers