"These days vitamin B12 is produced commercially by direct fermentation, using 'Propionibacterium Shermanii' or 'Peracoccus Denitrificans':
1) P. Shermanii can be grown in anaerobic culture for 3 days and in aerobic culture for 4 days to produce vitamin B12. The growth medium contains glucose, cornsteep liquor (a waste product of starch manufacturer) and cobalt chloride, maintained at PH7.
2) For P. Denitrificans, the growth medium contains sucrose, betaine, glutamic acid, cobalt-chloride, 5-6 dimethyl-benzimidacole and salts; and it is grown for 2 days in aerated culture for B12 production". (Link)
- Note: "Animals and plants require cobalt in order to synthesize / produce B12. (B12 is called cobalamin because of the cobalt atom in it's center). In reply to 'where does the bacteria come from', one could maybe reply 'from cobalt', but this isn't totally 100% correct. It comes from a combination of microorganisms and cobalt...Commercial B12 production is partly based on growing B12 on the surface of molasses" (Link).