728x90
데이터베이스 사용자계정을 체계적으로 관리하기 위해
mysql 에서 제공하는 파라미터 중 max_user_connections 을 활용해보기로 했다
max_user_connections 은 지정한 mysql 계정에 허용되는 최대 동시 연결 수 이다
-- 최대 커넥션 개수 조회
SELECT max_user_connections
FROM mysql.user
WHERE user='userid'
AND host='%';
-- 최대 커넥션 개수 업데이트
UPDATE mysql.user
SET max_user_connections = 1
WHERE user='userid'
AND host='%';
728x90