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.
- 2After 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.Tero Kilkanen– Tero Kilkanen2021-11-28 21:30:58 +00:00Commented Nov 28, 2021 at 21:30
- First, what do you mean by "user"? OS login? Or MySQL login? Or WP login?Rick James– Rick James2021-11-29 01:11:51 +00:00Commented Nov 29, 2021 at 1:11
- @RickJames I meant MySQL login.peter– peter2021-11-29 03:22:04 +00:00Commented Nov 29, 2021 at 3:22
Add a comment |
1 Answer
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.
- 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– peter2021-11-29 03:21:14 +00:00Commented Nov 29, 2021 at 3:21
- 2@peter - short answer: no.Rick James– Rick James2021-11-29 03:49:01 +00:00Commented 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'TNiKiZe– NiKiZe2021-11-29 06:47:28 +00:00Commented Nov 29, 2021 at 6:47