1

I have always believed that you can create as many users as you like. I have been creating a user per app with limited database/table access for only what that app requires.

Recently I was told there is a limit. While I have never heard of one, or reached one, I still wanted to ask the community.

Note: I am not referring to max connections, but the number of users.

1

User accounts are again stored in tables in terms of rows and columns and also its respected permissions under mysql database wherein it has primary key as host and username. So, I don't think so you have any limitations. But you have something called max_connections that has to be set to a value, say it has 100000 as max that you can set. Then keeping each user connection in mind then we can go upto 99999 users connected to it parallely.

My question to you is.

  1. Why do you need all different users to be connected to the mysql connection pool?
  2. It is highly impossible to make a note of users permissions and its passwords.
  3. If you need those many users for application purpose, you may try doing it in regular innodb tables and have list of users under one group and tag them to a role. Just grant multiple roles to the users who needs the access.
1
  • Thanks. I'm not creating that many users. More like my web apps have a common user, but for apps not hosted on my server and access my database each have their own user. That way I can track if that user was hacked and limit control that app has to its own domain. Mar 18 '13 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.