웹마스터 팁
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
자료가 깨졌군요 -_-;;
제목 | 글쓴이 | 날짜 |
---|---|---|
[iframe:아이프레임] 내용에 맞게 사이즈 조절하기 한번입력으로 끝.[다른방법:중복아닌듯] [45] | beMax | 2004.04.23 |
(For 초보)원클릭으로 여러프레임 컨트롤하기 [2] | 쉬드 | 2004.04.19 |
자기가 살아온 시간 구하기.. 데스크탑에 나타내기 [4] | kein23 | 2004.04.14 |
브라우저 버젼별 다른 페이지 보여주기 [2] | Kuldahar | 2004.04.13 |
바보같은 MS의 parseInt 버그. [4] | 김관석 | 2004.04.09 |
XP계열의 방문자 컴에서 ClearType 효과 사용여부 확인 [4] | YeUPy | 2004.04.04 |
팝업공지창 2개이상 띄우기(시간제한 가능) [8] | lemin | 2004.03.23 |
허접한 풀다운 메뉴 소스입니다. (유용한 팁 일지는 모르겠네요.)
[9]
![]() | tintintm | 2004.03.23 |
버튼 만들기 [1] | 旻天 | 2004.03.23 |
MS agent online object - Default Character 인 Merlin Action 추가 [2] | 꽃ちゃん | 2004.03.19 |
움직이는 타이틀바 [4] | 김동현 | 2004.03.18 |
웹브라우저 상태바가 밑으로 내려오는 소스 [5] | 프리서버 | 2004.03.16 |
브라우져(윈도우) 창의 크기(사이즈)를 조절하는 소스입니다 [5] | 나야 | 2004.03.15 |
프레임사이트에서 자식 프레임(URL)로 직접 치고 들어 올경우 다시 프레임 부모로 돌려보내는 소스 | 나야 | 2004.03.15 |
전체 include menu 만들기(롤오버 이미지 사용) [4] | Neoyoung | 2004.03.14 |
[초간단 자바스크립트!] 서브메뉴 만들기...~ [11] | ∑Ztxy | 2004.03.10 |
뉴스티커
[16]
![]() | zero | 2004.03.10 |
보안문서 만들기 [5] | 민우주 | 2004.03.07 |
팝업 창 띄우고 어미창 사라지게 하는 소스 [5] | piasol | 2004.03.06 |
방문자 OS보여주기 [5] | 구조반 | 2004.03.05 |
$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 같은 호스트 네임은 물론 써야 하구요 ^-^)/ ) - 제로오빠한테 배움;;