Oh boy, you’ve got a tricky one here. Not so much for getting rid of the mould and mildew itself, but because it could have already broken down the seals, which will effectively mean your tent will probably no longer be waterproof. The chances are that the previous owners packed the tent away when it was wet, which gave the spores a chance to grow.
So what can you do? You can get rid of the mildew with some work, although to try – the emphasis is on try - and get the tent back to its original state will be a three-step process, and there’s really nothing that can eliminate the stains left by the mildew.
First of all, put the tent up, either in the garden (or the garage if it’s raining) and let it air out thoroughly. After that you can scrub the seals, although that’s unlikely to get rid of everything. So you’ll need a very dilute solution of bleach in hot water – no more than a capful or two of bleach to a gallon of water. Ideally you’d use a pressure washer, but since the vast majority of people don’t own those, it’s good old elbow grease and scrubbing, making sure you get into all the nooks and crannies; be as thorough as possible.
After that, let the tent air dry thoroughly again. Then you’ll need to mix salt and lemon juice – quite a bit, about a cupful of each – with another gallon of hot water and go over everything again with that.
Those two things will get rid of the mildew and all the spores, and additionally take care of that lingering musty aroma associated with mildew, so the tent will smell good and fresh.
There are a number of good waterproofing products on the market that you can use on the interior seals (indeed, after washing, you might want to go ahead and waterproof the entire tent); if you’re not sure, ask in a camping shop, explaining the problem and they should be able to offer recommendations. If the mildew hasn’t caused too much damage, this will do the trick. But there’s obviously no guarantee of that.
Just as a reminder for the future – never pack your tent away for long periods when wet. Set it up and let it air dry first.