3

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

1 Answer 1

4

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? Commented Nov 29, 2021 at 3:21
  • 2
    @peter - short answer: no. Commented Nov 29, 2021 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 Commented Nov 29, 2021 at 6:47

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.