SQL Injection, yes It’s often happens around the web. In fact in real life example a lot of Content Management systems were affected by this weakness. Technically there was no software to protect or check SQL queries for suspected activity. Recently an open source software called GreenSQL offers a firewall solution for MySQL queries. It’s an Open Source database firewall used to protect databases from SQL injection attacks. GreenSQL works as a proxy for SQL commands and has built in support for MySQL. The logic is based on evaluation of SQL commands using a risk scoring matrix as well as blocking known db administrative commands (DROP, CREATE, etc). GreenSQL is distributed under the GPL license.
How it works?
GreenSQL acts as a reverse proxy for MySQL connections. It means, that instead of MySQL server, your applications will connect to GreenSQL server. GreenSQL will analyze SQL queries and forward them to the back-end MySQL server. Maybe this diagram will help you to understand the concept of it