?
Solved

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

Posted on 2014-12-28
3
Medium Priority
?
121 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 498 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 501 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 501 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

777 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