1

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.

3
  • 2
    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. Nov 28 '21 at 21:30
  • First, what do you mean by "user"? OS login? Or MySQL login? Or WP login?
    – Rick James
    Nov 29 '21 at 1:11
  • @RickJames I meant MySQL login.
    – peter
    Nov 29 '21 at 3:22
3

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.

3
  • 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?
    – peter
    Nov 29 '21 at 3:21
  • 2
    @peter - short answer: no.
    – Rick James
    Nov 29 '21 at 3:49
  • 1
    @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
    – NiKiZe
    Nov 29 '21 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.