I've heard about creating different users for different tasks, usually based on the principle of only allowing that connection the permissions to do what it needs to. I always thought that had merit, but now that I am faced with putting it into practice a few questions arose.
1. Is the idea behind this purely SQL injection security?
If this is the case, then it's likely redundant to be using a minimum-permissions user for queries using only pre-selected data.
2. Every time I switch users it has to re-initialize the connection, right? Should I be concerned about performance loss?
This could have a bearing on how I structure some scripts. I'm not actually sure, is connecting to a database more than once per load usually a good sign you're doing something wrong?
Thanks, I would be interested to know if this is common or not.