PachinSV
PachinSV

Reputation: 3780

Users per applications in MySQL

I work with a few applications at the company I work for. I would like to know what should be a better choice:

  1. create each person a user y MySQL (configured through an ODBC)
  2. create a user per application and use the same user in all ODBCs through the whole company?

What do you think will be the advantages or drawbacks?

Upvotes: 1

Views: 191

Answers (2)

Mikecito
Mikecito

Reputation: 2063

I would go with a user per application. If your company is of any size, you will quickly find yourself spending all your time creating and destroying MySQL users.

It is better to maintain the user logins in a database for authentication on application startup, and then the application it's own connection/user to MySQL (which it also uses to authenticate the user).

Then limit all your security based on the user rights that you design in your user table, instead of relying on MySQL to keep people in check.

Upvotes: 2

Marco
Marco

Reputation: 57573

I think you'd better creating a user (with few privileges, the ones required and no more) for every application.
Then create (for every application) a superuser) that maintains it.

Upvotes: 2

Related Questions