Databases Forum

I am on shared hosting, and run a small e-commerce site that is database driven (mysql).

Since I am on shared hosting, I have no access to the mysql logs. More than several times I've accidentally deleted or changed something and had to go through old backups to restore it. So I thought about creating my own log .. something along the lines of a function i.e.

I know this is a hard question to answer, but I'm wondering whether this will overload the server in any way? Some pages use mysql more than others, but some of the popular pages have probably 10-20 query's. This would in effect double that.

>> More than several times I've accidentally deleted or changed something and had to go through old backups to restore it

I don't see how keeping a log of this nature helps you with this problem. Perhaps you could explain? Do you keep backups of the file system as well? Do you use version control software? All things to think about.

I personally thing logging every query is not necessary. Especially since you now have to go back and modify your entire CMS every time you query the tables. If you are worried about security issues then you should only use a user id that has privileges to the specific things it needs to do to the tables it needs to do them. Most of the time this is SELECT, and ever so often an UPDATE or DELETE.