Yes.
The first is rather stilted - it would be far more natural to ask simply, "How are you?"
The second is unnatural. It should be, "Can I ask how old you are?". Even if this is grammatically acceptable, you need to be aware that it may not be culturally acceptable. Asking someone's age, even indirectly, may offend some people.