Solved

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

Posted on 2014-12-28
3
117 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Powershell error using sql agent job 24 37
SQL: Transformation or Pivot 3 35
sql server query 9 26
Sql group by orderdate and ordertotal 3 8
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…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

732 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