AOPA has the best database that I know of, but you have to be a member to view it. They have some free information on their Medications page though.
There they talk about FAA Policy, and it starts with:
The Federal Aviation Regulations include no specific references to
medication usage. FAR 61.53 prohibits acting as pilot-in-command or in
any other capacity as a required pilot flight crewmember, while that
person:
Knows or has reason to know of any medical condition that would make the person unable to meet the requirement for the medical certificate
necessary for the pilot operation, or:
Is taking medication or receiving other treatment for a medical condition that results in the person being unable to meet the
requirements for the medical certificate necessary for the pilot
operation. Further, FAR 91.17 prohibits the use of "any drug that
affects the persons faculties in any way contrary to safety."
AMAS (Aviation Medicine Advisory Service) also has a list (which is free) but I don't think that it is organized as well. They are recommended by ALPA and NBAA though.
The most important thing though, of course, is to self evaluate and make sure that you don't fly if you are having any adverse reactions from the medication, or the underlying condition that you are taking the medicine for.
Any list that you consult has to be used only as a guide though, and not a carte-blanche approval. Individual people can have reactions even to medications that are considered "safe" and "allowed" by the FAA, and this is why they don't list specific medications that they allow. The FAA has a brochure called Medications and Flying, and one part of it has a few things to consider before taking any medication:
First, consider the underlying condition that you are treating. What
will be the consequences if the medication doesn’t work or if it
wears off before the flight is over? A good general rule to follow is
not to fly if you must depend on the medication to keep the flight
safe. In other words, if the untreated condition is one that would
prevent safe flying, then you shouldn’t fly until the condition
improves — whether you take the medication or not.
Second, you must consider your reaction to the medication. There
are two broad categories of medication reactions. One is a unique
reaction based on an individual’s biological make-up. Most people
don’t have such reactions but anyone can, given the right medication.
Because of this, you should NEVER fly after taking any medication
that you have not taken before. It is not until after you have taken
the medication that you will find out whether you have this uncommon
and unexpected reaction to the medication.
Third, consider the potential for adverse reactions, or side
effects — unwanted reactions to medications. This type of reaction is
quite common, and the manufacturer of the medication lists these on
the label. You MUST carefully read all labeling. If you don’t have
access to the label, then don’t fly while using the medication.
Look for such key words as lightheadedness, dizziness, drowsiness, or
visual disturbance. If these side effects are listed or if the label
contains any warning about operating motor vehicles or machinery,
then you should not fly while using the medication.
Side effects can occur at any time, so even if you’ve taken the same
medication in the past without experiencing side effects, they could
still occur the next time. For this reason, you must never fly after
taking a medication with any of the above-noted side effects.