Security may not make you but it sure can break you. As modern web applications become more and more complexed puzzles and filled with thousands of features catering to a spectrum of user preferences and tastes, the developers are burdened with ever-going responsibilities to keep them sound and safe. There are people (crackers) out there who are trying to make a name by breaking into your backyard or otherwise messing around in any way possible to make your day interesting. Your application or website is potentially vulnerable by simply being online. Everyone including innocent users can mess things up if yours is designed without security awareness. These books of web security are hand selected from Amazon that will get you a strong start on building secure websites applications and avoid being hacked. They are both new (published no more than 5 years ago) and well received (rated no less than 4/5 by the readers).
General Website / Web App Security
Web Security Testing Cookbook: Systematic Techniques to Find Problems Fast
The Web Application Hacker’s Handbook: Discovering and Exploiting Security Flaws
How to Break Web Software: Functional and Security Testing of Web Applications and Web Services
Foundations of Security: What Every Programmer Needs to Know (Expert’s Voice)
Essential PHP Security
Pro PHP Security
Database / MySQL Security
The Database Hacker’s Handbook: Defending Database Servers
MySQL Administrator’s Bible (Bible (Wiley))
Other Security Related Books
Web Application Architecture: Principles, Protocols and Practices
HTTP: The Definitive Guide
To learn more about these specific areas and build better web applications, Amazon has the best PHP books, best MySQL books and best Apache Books.