The first step to any solution, of course, is going to look at other indutralized countries that have such shootings far less frequently, and then attempt to copy what they do.
In general, those countries that have the fewest mass shootings like this tend to be:
1. Secular/godless - those countries that have the least amount of belief in God or other supernational beliefs have far lower rates of crime, including violent crime/gun rampages. They also have far higher rates of acceptance of the theory of evolution.
2. Lower rates of income and wealth inequality
3. Universal healthcare - so that all the mentally ill can get treatment, unlike in the U.S. where they must either have insurance (you think a mentally ill person can hold a job?) or be born into wealth, or (3), qualify for Medicaid.
4. Much more restricted access to fire arms