There is a PHP application that uses only one MySQL username. And there are several databases in the MySQL server. Each database is used by a different company. Should I keep "one MySQL" for the entire system or should I switch to "user per database"? Will I have performance increase if I switch to "user per database"?
1 Answer 1
Using different users will not reduce or increase the performance. It is clearly a security issue.
Usually you don't want users from company A to be able to access company B data.
I would recommend to create separate users for each application and grant them only the necessary permissions.
If you run the application using a user with admin rights you risk a lot when the application gets compromised.
-
However, it sounds like there is one application that works for all databases (ie, companies).Rick James– Rick James2015年12月11日 20:12:32 +00:00Commented Dec 11, 2015 at 20:12
USE company_db
is your level of security.