The old-fashioned type of mains-powered fairy lights (without a transformer) were wired in series, so that each bulb only received (typically) around 3 volts.
Battery operated fairy lights (and main-powered ones via a transformer) are wired in parallel. If you connect them directly to the mains supply you'll be putting 230 volts across each bulb that's only designed to have around 3 volts across it, probably resulting in the whole lot exploding!