It's the same in Singapore.
You can only buy from a pharmacist (behind the counter) and you need to provide your national ID number. Your purchase is put in a database that any pharmacist can see.