MySQL - Prevent a user login to be connected more than 1 time.

Is there a way in MySQL to prevent 2 or more end devices in a networking environment to be connected at the same time using the same login parameters (User ID and Password)?
Who is Participating?
Tomas Helgi JohannssonConnect With a Mentor Commented:

This can be done by limiting resources to the user.
I would not set this globally if you have a server that has system-users dedicated to web systems or other systems using multiple connections as Dave is pointing out.
But you can limit other and/or certain users using the method I mentioned above.

     Tomas Helgi
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
I wouldn't think so.  That is a pretty common occurrence.  Software, particularly web pages, often use the same username and password on multiple computers to connect to an application specific database.
Don VonderBurgConnect With a Mentor President/CEOCommented:
If each end device on the network uses different user id or logins you can use the max_user_connection and set it to 2. But I think it is global and will set it for all accounts.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.