웹마스터 팁

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
여기서 다운로드 받으실 수 있습니다...
제목 글쓴이 날짜
PHP에서의 SQL문 보안취약성 [5] 김영빈 2002.09.09
자동 apm 설치 쉘스크립트(리눅스) [5] file 김동현 2002.09.15
나만의 ftp서버 만들기 제2부 -serv-u 4.0- [12] 레드 2002.10.09
보안설정을 하다^^ 유의할점. [3] Dopesoul 2002.10.14
리눅스 서버를 구축해 보자! #1 [11] 꼬토 2002.11.21
Apache + PHP + Mysql확실한 연동 및 리눅스 재설치 정보 [2] file 최종우 2002.11.26
[FreeBSD] qmail+mysql+vpopmail+qmailadmin 설치 [1] DeX™ 2002.11.26
초보자도 쉽게 이해할수있도록 주석을 자세히 달아놓은 APM 메뉴얼 (3 of 3) [2] Dopesoul 2002.12.21
[초초초(X999)허접강좌]사용자들이 하는 작업 강제 취소,IP막기 [5] -=:{Inuri}:=- 2002.12.21
잊을만하면 알려드립니다. issue.net 과 motd 파일 [5] Dopesoul 2002.12.28
htaccess를 활용하자 3탄! 사용자인증 [4] [쿨럭]블루엔젤 2003.01.23
qmail-1.03설치⑦ (qmailadmin 큐메일 웹관리툴) 비츠로 2003.02.28
qmail-1.03설치⑧ (squirrel웹메일과 연동) 비츠로 2003.02.28
Apache1.3.27 + PHP4.3.1 + MySQL4.0.12 + ZendOptimizer2.1.0 [6] FriZeX 2003.03.19
md5 암호화 알고리즘을 488bit blf 알고리즘으로 바꾸기 [17] 김령현 2003.04.04
ie60이상버전의 개인정보기능으로 인한 서비스문제 [2] 날파리 2003.05.21
[진자 유용한] www 자동으로 붙여주기 [6] Dopesoul 2003.05.24
mysql 강좌 .. 요약본 [4] 이성헌 2003.06.05
NOP_0x90 Document No.2(APM연동 Mysql-DB설정편) NOP_0x90 2003.07.06
apache_2.0.47 + php-4.3.3 + mysql-4.0.16 + zb41pl4 의 windows xp 설치 [3] 기산 2003.10.28