I'm making a website that will facilitate multiple users updating various sets of data.
I'm a complete novice with MySQL, but I'm learning fast!
My question is, should I use the same dba user account to do all the updates/modifcations (through PHP), or should I create a new user account for each registered user of the system?
If anyone has time to explain the "why" part I'd be appreciative.
If you are asking, should they all use the same login account? non!
If you mean should they each have their own db account for their db connection?.. non!
In my experience/opinion (limited), they should each use the same db connection with privileges limited to the minimum sufficient for their potential tasks. You might also find it useful to have a column in your tables, to show who (which username) uploaded a file, and when.
I think you've confused mysql user accounts with something like a login/registration system in php. Generally, you make a single mysql user account for a php script/website. The php script will use this account to log into mysql. From there, php can perform a query on the database.
To give an example...imagine this forum. The php code which powers the forum uses a single mysql account, despite having many many thousands of users who are allowed to post/view/delete. It's even able to be logged in at the same time as other php scripts using the same account.
The php script is in charge of restricting what a user does.
Bookmarks