Solved

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

Posted on 2014-12-28
3
116 Views
Last Modified: 2014-12-29
Hello,
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)?
0
Comment
Question by:Omer-Pitou
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 40521207
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.
0
 
LVL 1

Assisted Solution

by:Don VonderBurg
Don VonderBurg earned 167 total points
ID: 40521211
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.

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_user_connections
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 167 total points
ID: 40521446
Hi!

This can be done by limiting resources to the user.
http://dev.mysql.com/doc/refman/5.5/en/user-resources.html
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.

Regards,
     Tomas Helgi
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Add Parameter in Variable 4 21
mysql qry 1 22
MySQL-Design Help 12 41
T-SQL: How to extract records into a new table 7 17
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question