So the question is simple. Does making strange column or database names in MySQL increase its security?
3 Answers
No. If you can read the MySQL schema tables, you can extract the names anyway, and the schema tables have fixed names.
Work on preventing SQL injection through the use of parameterised queries and other well documented techniques, and it doesn't matter if your table and column names are predictable.
- 27,263
- 7
- 89
- 101
Do not even consider that! It is nothing more than security by obfuscation. It is even worse here, because knowing the table or columns names does not help an attacker until he can access the database at the SQL level, and once it is there he can trivially list everything.
Of course he will not be able to guess easily what is behind each column, but it could be enough for him to erase or change your data...
And strange names will mainly make harder future maintenance on the database or any application using it, which would be definitely bad.
- 25,952
- 4
- 42
- 84
Security by obscurity is never a good idea, and in this specific case, the obfuscation of names of databases, tables, fields, and other database objects will just make software development more difficult.
- 141
- 4