Howtos phpMyAdmin Basic Installation > 서버관리 Tip

본문 바로가기
 

Howtos phpMyAdmin Basic Installation

페이지 정보

작성자 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 21,021회 작성일 11-02-11 00:23

본문

Howtos phpMyAdmin Basic Installation

From 5dollarwhitebox.org Media Wiki

Jump to: navigation, search

Contents

[hide]

Summary

So, this isn't really the type of thing that needs a howto... but it is more so I can refer people here... and so I don't have to show them!


Get phpMyAdmin

Download latest from: http://sourceforge.net/projects/phpmyadmin/

linuxbox #] wget http://easynews.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.8.1.tar.gz 

linuxbox #] tar -zxvf phpMyAdmin-2.8.1.tar.gz 

linuxbox #] mv phpMyAdmin-2.8.1.tar.gz /usr/local/phpMyAdmin-2.8.1

linuxbox #] ln -s /usr/local/phpMyAdmin-2.8.1 /usr/local/phpMyAdmin

linuxbox #] mkdir /usr/local/phpMyAdmin/config

linuxbox #] chown apache /usr/local/phpMyAdmin/config

Note: Substitute the actual URL to the latest version of phpMyAdmin... don't copy and paste that line.


Apache Configuration

Add the following to the Global Apache Configuration by creating a file a file in the 'conf.d' include directory (you can also just add it to the httpd.conf or apache2.conf but this way is recommended):

  • RedHat/CentOS/Fedora: /etc/httpd/conf.d/phpMyAdmin.conf
  • Debian/Ubuntu: /etc/apache2/conf.d/phpMyAdmin.conf


Alias /phpMyAdmin "/usr/local/phpMyAdmin"


To be smart and secure, I would recommend something like the following to Force the use of SSL:

<Directory "/usr/local/phpMyAdmin">
      SSLRequireSSL
</Directory>


Restart apache

linuxbox #] /etc/init.d/httpd restart


Configure phpMyAdmin

Configure the Conrol User... First you need to create the phpMyAdmin control user in mysql:

mysql>  GRANT SELECT ON mysql.user TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'password';

mysql>  GRANT SELECT ON mysql.db TO 'phpmyadmin'@'localhost';

For the love of everything sane, please replace 'password' with something random, obscure, stupid... regardless, not 'password'.


Create the config:

linuxbox #] cd /usr/local/phpMyAdmin
linuxbox #] cp -a libraries/config.default.php config.inc.php


Edit '/usr/local/phpMyAdmin/config.inc.php' and modify the following settings:

$cfg['blowfish_secret'] = 'Enter_A_Completely_Random_String';

$cfg['Servers'][$i]['controluser']   = 'phpmyadmin'; 

$cfg['Servers'][$i]['controlpass']   = 'password'; 

$cfg['Servers'][$i]['auth_type']     = 'cookie';


You should now be able to hit phpMyAdmin at http://www.domain.com/phpMyAdmin . Login with a MySQL username/password.



Security

This is very important. If the box does not have a MySQL root password set, then anyone in the world can login to phpMyAdmin with user 'root' and no password and have full access to the database server. THIS IS BAD! If the root password is not set, please set it:


Set MySQL Root Password:

linuxbox /]# mysql

mysql> SET PASSWORD FOR 'root'@'localhost'=PASSWORD('password');

mysql> FLUSH PRIVILEGES

For the love of everything sane, please replace 'password' with something random, obscure, stupid... regardless, not 'password'.


To ease logins if you don't like to use a password, simply create your user's .my.cnf file. Say for root, this would be '/root/.my.cnf':

linuxbox /]# vi /root/.my.cnf

Using VI, and the following:

[client]
user=root
password=password

Where 'password' is the MySQL root user's password.


Secure the file (IMPORTANT):

linuxbox /]# chmod 600 /root/.my.cnf


You can then still access MySQL without typing a password.

댓글목록

등록된 댓글이 없습니다.

Total 159건 5 페이지
서버관리 Tip 목록
번호 제목 글쓴이 조회 날짜
87 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13641 02-28
86 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 8418 02-12
열람중 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 21022 02-11
84 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16743 02-10
83 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10001 02-09
82 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9723 02-09
81 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15595 02-09
80 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9529 11-19
79 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 17094 10-30
78 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14628 10-29
77 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15135 10-17
76 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16254 10-17
75 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15683 10-17
74 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11708 10-13
73 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 14124 08-30
72 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 18348 08-20
71 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 1 08-20
70 no_profile 차동박 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10902 08-20
게시물 검색