웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
[추천 소스] phpMyAdmin 다중사용자용...
2001.11.29 07:49
http://mysql.netardor.net/phpMyAdmin.tar.gz이런것도 팁이 될런지 모르겠고... 또한 제가 무식하게 사용하는건지도
모르겠습니다만...
여러명이 사용하는 서버에서 각각의 사용자가 phpMyAdmin 을 사용하려고
하는 상황이다보니 다들 자기 계정에 phpMyAdmin 을 올려놓고 config.inc.php 에 자신의 DB 정보를 넣고 사용하더군요.
좀 낭비다 싶어 config.inc.php 파일을 다음과 같이 수정했습니다.
if(!isset($PHP_AUTH_USER)) {
auth();
}
else {
$id=$PHP_AUTH_USER;
$pass=$PHP_AUTH_PW;
}
$user_db = $id;
if ( $id == 'root' ) $user_db = '';
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['adv_auth'] = false; // Use advanced authentication?
$cfgServers[1]['stduser'] = $id; // MySQL standard user (only needed with advanced auth)
$cfgServers[1]['stdpass'] = $pass; // MySQL standard password (only needed with advanced auth)
$cfgServers[1]['user'] = $id; // MySQL user (only needed with basic auth)
$cfgServers[1]['password'] = $pass; // MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = $user_db; // If set to a db-name, only this db is accessible
// It may also be an array of db-names
이렇게 하니 자신의 apache auth 에서 자신의 DB 아이디와 비밀번호를
넣으니 자신의 DB 만 나오더군요.
root 로 로그인 했을때는 모두 다 나오게 예외처리를 하긴 했습니다만..
phpMyAdmin 2.2.0 으로 했구요.
http://mysql.netardor.net/phpMyAdmin.tar.gz
여기서 다운로드 받으실 수 있습니다...
모르겠습니다만...
여러명이 사용하는 서버에서 각각의 사용자가 phpMyAdmin 을 사용하려고
하는 상황이다보니 다들 자기 계정에 phpMyAdmin 을 올려놓고 config.inc.php 에 자신의 DB 정보를 넣고 사용하더군요.
좀 낭비다 싶어 config.inc.php 파일을 다음과 같이 수정했습니다.
if(!isset($PHP_AUTH_USER)) {
auth();
}
else {
$id=$PHP_AUTH_USER;
$pass=$PHP_AUTH_PW;
}
$user_db = $id;
if ( $id == 'root' ) $user_db = '';
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['adv_auth'] = false; // Use advanced authentication?
$cfgServers[1]['stduser'] = $id; // MySQL standard user (only needed with advanced auth)
$cfgServers[1]['stdpass'] = $pass; // MySQL standard password (only needed with advanced auth)
$cfgServers[1]['user'] = $id; // MySQL user (only needed with basic auth)
$cfgServers[1]['password'] = $pass; // MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = $user_db; // If set to a db-name, only this db is accessible
// It may also be an array of db-names
이렇게 하니 자신의 apache auth 에서 자신의 DB 아이디와 비밀번호를
넣으니 자신의 DB 만 나오더군요.
root 로 로그인 했을때는 모두 다 나오게 예외처리를 하긴 했습니다만..
phpMyAdmin 2.2.0 으로 했구요.
http://mysql.netardor.net/phpMyAdmin.tar.gz
여기서 다운로드 받으실 수 있습니다...
댓글 5
-
순진소녀
2001.11.29 14:23
-
®웃^음^이®
2001.11.30 00:18
안좋은점!! - 자기 DB를 삭제 하면 다른 DB까지 다나온다는 사실 ㅡㅡ;; -
WOWpc
2001.12.03 05:42
순진소녀님처럼 해서 되면 제가 왜 저렇게까지 복잡하게 만들었을까요..
안되니 수정한겁니다. 쩝.. -
순진소녀
2001.12.03 15:29
-_-; 그렇군요;; 그런 얘긴 없어서; 저런 방법이 있다고 말한거거든요? ;'; -
º.ª;;;
2002.12.14 21:04
자료가 깨졌군요 -_-;;
제목 | 글쓴이 | 날짜 |
---|---|---|
쉘 명령어 사용하기 [11] | 9000㎒ | 2003.12.02 |
세션을 이용한 관리자 모드 구축하기 1강(중복?) | 박정호 | 2003.12.09 |
세션을 이용한 관리자 모드 구축하기 2강 [6] | 박정호 | 2003.12.09 |
세션을 이용한 관리자 모드 구축하기 3강 [6] | 박정호 | 2003.12.09 |
DB에서 받은 데이터 배열로 하나씩 뿌리기 | LetMeLove | 2003.12.09 |
편법을 이용한 inlive 방송여부 체크 [7] | 심심타 | 2003.12.09 |
카일레라 서버 페이지 만들기. [2] | teslaMINT | 2003.12.09 |
[제로카운터] 자동으로 DB를 지우자. (IP와 referer 5일 분량만 남기기) [4] | 이주경 | 2003.12.17 |
나도 @ 도메인 서비스를 해보자 [29] | 김병철 | 2003.12.19 |
[MySQL] Set 형 자료형.. [3] | 서영태 | 2003.12.24 |
일정시간 이 지난 게시물 정리하기.. [3] | 명동욱 | 2003.12.24 |
GET으로 받는 변수가 하나일 때, 주소?변수값 사용하기 [5] | 버찌 | 2004.01.05 |
[팁&테크] 텍스트파일에서 디비 입력하기. [1] | 김영진 | 2004.01.09 |
include에서 Failed opening 발생문제 [4] | 이경훈 | 2004.01.10 |
unset / isset 를 알아보자. [2] | 씨파개 | 2004.01.12 |
제로보드 인크루드시 $DOCUMENT_ROOT 참조 [7] | 이경훈 | 2004.01.14 |
제로카운터 쉽게 설치하기
[26]
![]() | 대류 | 2004.01.17 |
(중복) 개인서버 운영하시는분들.. 좋은소스? [14] | SeePaGae | 2004.01.22 |
아이피를 숨겨보자 [5] | SeePaGae | 2004.01.23 |
[초허접기초!!] PHP 가 무엇인고..?? 1탄.. [6] | SeePaGae | 2004.01.24 |
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['stduser'] = ''; // MySQL standard user settings (this user must have read-only
$cfgServers[1]['stdpass'] = ''; // access to the "mysql/user" and "mysql/db" tables)
$cfgServers[1]['adv_auth'] = TRUE; // Use advanced authentication?
$cfgServers[1]['user'] = ''; // MySQL user
$cfgServers[1]['password'] = ''; // MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is displayed at left frame
// It may also be an array of db-names
$cfgServers[1]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname
$cfgServers[1]['bookmarkdb'] = ''; // Bookmark db - leave blank for no bookmark support
$cfgServers[1]['bookmarktable'] = ''; // Bookmark table - leave blank for no bookmark support
요렇게 해줌 디비 아이디 비번 쓰면 같은 서버일경우 자기 디비에 접속 되요~
그냥 암것도 안쓰고; [adv_auth] 에 {TRUE} 만 써줌 되는 거죠;;
(localhost 같은 호스트 네임은 물론 써야 하구요 ^-^)/ ) - 제로오빠한테 배움;;