In addition to advanced logic, you will also have different connections and significant overhead in this area.
IMHO it is advisable not to fulfill all your requests in the webapp with the root user, and if the data is so hot, then make sure that the designated user does not have DROP, DELETE, etc. privileges. You can implement soft-delete if necessary in your application.
Last but not least, make sure you sanitize all the GPCs and make sure that you specify / delete files correctly in your requests. Using prepared statements can be one, but in the end it can be as simple as using mysql_real_escape_string () or any citation methods of your DBAL / ORM clause.
source
share