Number of database webusers?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply

How many web database users do you use?

1 per server
3
30%
1 per application
5
50%
2 per application
1
10%
3-4 per application
1
10%
5+ per application
0
No votes
 
Total votes: 10

User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Number of database webusers?

Post by nielsene »

In some conversations off this forum with other web-scripters/programmers I found that most seem to use a single "webuser" login per server for connecting to their database(s). Even if they have multiple, distinct applications/databases. In some cases this was because that's all theiir web-hoster allowed, but in many cases they just never considered using more than one and passing some of the user authorization duties off to the DBMS.

So how many database users do you use?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I tend to setup users to do specific things, so that we have users for database administration which can SELECT, INSERT, UPDATE and DELETE on specified databases and/or tables; users which are used to access tables for data retrieval purposes only (can't do anything but SELECT) as well as a couple of database admin users with full MySQL privileges.

Mac
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

I set things up in a similar manner, most applications get at least three websuers: tool_unauth_user, tool_auth_user, and tool_admin_user. The first is for non-logged in page views. The second for logged-in but not admin useres. I'll normally create two usergroups, if the database supports it, tool_all that has the three users in it and tool_trusted that has both classes of logged in users. (In all the above cases the "tool" gets replaced with an identifier for the application)

Typically none of these are "database super users" -- they can't create new databases or new users. I normally restrict such things to the command-line database users.
Post Reply