security - Limiting use of Select * in MySQL in a specific table -


I have a table that contains some sensitive data that I want to be more secure than the measures already taken by infiltration In the event of the attacker receiving our PHP source code, I want to preserve some data in the database.

The data in the database is already encrypted, and the encryption key is stored securely out of the source code, but unfortunately it is only delay which we hope to find intrusion Will give time and shut down the system. However, a reverse engineering of code is technically possible.

As a failed safe, I want to limit selection statements against a specific table. Our code should not need to retrieve more than one record from the table at a time. There is a way to limit the number of rows returning from a table with an administrative side of MySQL, so that queries like safe-protected_data_tables; Is not it possible?

Is there a way to limit the number of rows returning from a table

A common method of doing this is DENY to enter the table.

Create a stored procedure that selects an item from the table, such as by ID, and only access to that proc.

Comments