웹마스터 팁
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
자료가 깨졌군요 -_-;;
제목 | 글쓴이 | 날짜 |
---|---|---|
로그인 후 그룹별로 다른 페이지로 가기 - 업데이트판 v1.5 [19] | 무대포2 | 2009.06.24 |
로그인 페이지 만드는 방법 [5] | 산토 | 2009.06.12 |
별도 페이지 로그인방법 | cornet | 2009.05.21 |
내가 작성 한 글에 대한 일괄 삭제/이동/복사 권한 주기 [2] | 개돌 | 2009.05.15 |
BNU님의 Planner XE 1.2 버젼(일정관리) [9] | 개돌 | 2009.04.21 |
다양한 언어로 홈페이지 서비스하기 - 무식한 방법 [4] | 멀리서 | 2009.04.21 |
주민등록 입력 폼 1.2.0 [55] | 개돌 | 2009.04.10 |
요청하신 모듈을 찾을 수 없습니다 문제해결 방법 [2] | 반도체맨 | 2009.04.09 |
클릭마다 조회수 올리기 [1.4.0] [12] | 지B | 2009.04.04 |
특정그룹 멤버 표시 위젯에서 이름 순 정렬하기 [2] | 이재한744 | 2009.03.30 |
로그인 포인트 출력 위젯을 수정해보자 | [花穗] | 2009.03.27 |
제로보드의 아이콘을 내 맘대로 변경하기...(2) [2] | winter548 | 2009.03.23 |
브라우저 크기에 따라 본문 가로 크기 자동 조절 [1] | 개돌 | 2009.03.18 |
첨부파일의 외부 무단 링크 차단하기(XE) 게시판설정 [7] | 왕초보왕따 | 2009.03.02 |
테스트용 아이디 탈퇴 막기 [1] | SMaker | 2009.02.26 |
게시판에서 사이트 관리자만 볼수있는 항목 만들기 [1] | ☜ TeRy ☞ | 2009.02.13 |
사이트 이전팁( files 폴더) [6] | 샤이니라 | 2009.01.28 |
(재 수정) 제로보드 XE 신버젼에 Lavalic 2 설치하기 [4] | 조성우371 | 2009.01.16 |
제로보드XE 쉽게 업데이트 하는 방법.. [13] | 청개구리00 | 2009.01.12 |
로그인한 회원만 최근 게시글, 검색등 볼수 있도록 하기 [3] | [_)s | 2008.12.31 |
$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 같은 호스트 네임은 물론 써야 하구요 ^-^)/ ) - 제로오빠한테 배움;;