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.
Asked
Active
Viewed 92 times
1
-
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 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 01:11
-
@RickJames I meant MySQL login. – peter Nov 29 '21 at 03:22
1 Answers
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.
NiKiZe
- 1,189
- 7
- 17
-
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 03:21
-
2
-
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 06:47