The type of mercury discharge tube used for these classroom demonstrations has five strong lines in its emission spectrum. Four are visible, while one is UV with a wavelength of 365 nm, which is in the UVA range. The wavelengths that are harmful to the human body are mainly the ones in the UVB and UVC bands, which have wavelengths shorter than 315 nm. This fact alone makes it very unlikely that you were harmed.
We can also think about the intensity. UVA is about 6% of the energy content of natural sunlight.
Ultraviolet is absorbed somewhat by glass, so some of the UV would have not have escaped from the tube. However, the absorption of the 365 nm UV line in a typical glass discharge tube of the types I've worked with is not very efficient. The UV line is clearly observable through fluorescence, and the intensity of the UV line is about the same as the intensities of the four visible wavelengths that it emits as well. There are shorter wavelengths emitted by some mercury discharge tubes, but in the classroom-demo tubes I've used, those wavelengths are not observable. This is probably due to the intentional design of the tube (electrodes, voltage, pressure, etc.), and the glass would probably also absorb these shorter wavelengths much more strongly.
So roughly speaking, there are five lines of equal intensity, and the UV emitted by the tube is probably on the order of 20% of the light it emits. (The exact proportion depends on the details of the tube, and can even vary between different parts of the same tube.) What this tells us is that the proportion of UVA to visible may be somewhat higher for the light from the mercury discharge tube than for sunlight (perhaps by a factor of 3 or 4), but not massively higher. Therefore the intensity of the light as sensed by your eye is not too bad a gauge of the intensity of the UVA from this source. From my experience doing this sort of demonstration in a classroom, I assume the light seemed much less bright to you than bright sunlight. The eye-brain system senses intensity sort of logarithmically, so I'm guessing that the brightness of the light was maybe $10^{-4}$ of the brightness of bright sunlight. The UVA exposure you experienced would therefore be many orders of magnitude less than what you would have experienced by being outside in bright sunlight for a similar amount of time.
Note that ultraviolet also has positive health effects. You need UVB so that your body can synthesize vitamin D.