Score:1

One user for all databases or different user for different databases?

sa flag

I have multiple (Wordpress) websites that use different mysql databases. I would like to know if I should use different users for different databases, or just use one user (such as root) for all databases, considering only performance not security.

us flag
After user is authenticated, the performance is exactly the same. I'm sure you cannot measure the difference in authentication times if there are one user or ten users.
ua flag
First, what do you mean by "user"? OS login? Or MySQL login? Or WP login?
peter avatar
sa flag
@RickJames I meant MySQL login.
Score:3
in flag

Performance is not relevant, use one user per website for both traceability and security, that way if you ever get any performance issues you can more easily track which site it relates to.

peter avatar
sa flag
If I use one user for all databases, is there any competition/lock issue if several visitors browse different websites at the same time thus degrades the performance?
ua flag
@peter - short answer: no.
in flag
@peter locks (if they exists) are per connection, regardless of user. But using the same user for everything is just bad, and it is scary that you even consider it. to be clear, JUST DON'T
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.