Assuming no magic in this scenario, the best bet for survival on the human's end would likely be avoidance as stated in the comments. Moving underground or into caves narrows down the number of directions a dragon could approach and more or less mitigates the advantages they gain by flight. Barring that, however, ballista and other similar contraptions are feasible for the time frame and in fact did exist. Though perhaps not a guarantee for defense, it stands to reason that individuals would quickly hone the skills necessary to track and shoot down dragons with such weapons to survive.
With dragons becoming, presumably, one of the primary threats to these people it would also be reasonable to assume that they would focus research in improving these weapons as well as developing new ones, thus speeding up discoveries in ranged weaponry compared to historical progress.
As far as creative, low-tech solutions to dealing with flying threats: In the book series "The Black Company", there is a point in which, to counter broom-flying wizards/witches, the enemy who have no magicians to aid them send up large balloons with thick cables/tethers attached to them. The tethers are lined in spikes and other nasty things and put up in a pattern and volume that would foul up any sort of flying adversary. While certainly not fool-proof, it's a start and offers a similar protection as walls against ground-bound adversaries. Combined with ballistae and other such machines, it may be enough to deter or at least slow down dragons.
Edit In addition I find it likely that they would develop some sort of early warning system, and, if not having the entirety of their structures "dragon-proofed", at the very least they would have some sort of shelter created after the first few attacks. Like a system of towers using light to carry warning, or some other such set-up, to give warning of any dragon sightings. This would, hopefully, give time for the people to get into the dragon shelters, whether they be stone buildings, underground cellars or something else, so at the very least there's no loss of life to accompany property damage.
Edit 2 In response to your edit, if I recall correctly in the D&D universe there are a couple types of dragons (I want to say maybe Bronze or Brass) that are more focused on gather knowledge than laying waste to the country side. These, should they choose to communicate with humans, could certainly prove to be almost benevolent or at least neutral to humans so long as they comply in it's requests to garner knowledge. Though it could still be a hazard as it is still a dragon with all the might and fury that can bring when displeased. I think the example they gave was of the Brass (or bronze, or copper, whichever one of the metallic dragons it was) burying humans in the ground up to their neck so they could be questioned and not try to run away. Not exactly ideal, but presumably they're released when the dragon is done, better than being eaten or killed just because.
Heroes. That's what heroes were made for in medieval times – roetnig – 2017-06-07T13:30:26.730
3
While not a dup, it seems to have some overlap with this question. Might give you some ideas. http://worldbuilding.stackexchange.com/questions/13794/how-would-cities-be-designed-that-were-threatened-by-dragons
– bowlturner – 2015-05-07T20:05:09.450That information will end up being helpful, but I'm also looking for things that can be done after the fact of city-designing - say, if your buildings were already mud and straw and built above-ground, and THEN dragons showed up. – Bailey M – 2015-05-07T20:12:18.720
6You'll need to define "dragon" much more strictly than you have here. There's a wide variety in fantasy. Size, intelligence, magical capability (if any), etc. – Dan Smolinske – 2015-05-07T20:15:16.280
2...I think the answer to that is build new ones out of stone after the old ones burn down. – James – 2015-05-07T20:15:25.970
1You may also want to define the local environment and the abundance of magic (if any). – Frostfyre – 2015-05-07T20:33:15.207
4
I think you just cross yourself and stab it, and then put a virgin's girdle on its neck like a collar.
– KSmarts – 2015-05-07T21:00:51.190@KSmarts: that, or you take a friend along to kill it in case you die. Bailey M, it matters a lot if you're going for "realistic" or "heroic" fantasy. The traditional type of dragons generally occur in the latter genre. https://en.wikipedia.org/wiki/The_Dragon_(Beowulf)
– sumelic – 2015-05-07T21:47:38.020Get a Dragonborn to give it the old Fus Ro Dah, that should sort it. – Mike.C.Ford – 2015-05-08T10:32:44.037