Security features to prevent database attacks

I have a database hosted in my free hosting account. I have noted that I will not be able to create different database users in the free account. I wanted to know that what are the security measures that I should take to prevent or minimise database attacks. Formally, I want to know what are the steps which I should take to improve the security of my database.

Most common database hacking is SQL Injection, meaning that if you add ', " or ` to input then type SQL commands, it’ll execute it too and if you write dangerous SQL code in it, it’ll ruil your database.

To prevent that attack type, use prepared statements.


Our databases are not accessible to the internet, so that removes one possible attack vector.

Beyond that, choose a strong password and use parameterized queries to protect your website against SQL injection (like @anon19508339 recommended).

Additional database users (with restricted permissions) are only available on premium hosting.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.