天天看點

phpmyadmin-MYSQL管理工具安裝

系統環境:CentOS 5.5 x64

所需軟體:

phpMyAdmin-2.11.11-all-languages.tar.gz

mcrypt-2.6.8.tar.gz

libmcrypt-2.5.8.tar.gz

mhash-0.9.9.9.tar.bz2

MYSQL安裝

groupadd mysql 

useradd -s /sbin/nologin -g mysql -M mysql 

tar zxvf mysql-5.0.56.tar.gz 

cd mysql-5.0.56 

./configure 

--prefix=/usr/local/mysql 

--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock 

--localstatedir=/usr/local/mysql/data 

--enable-assembler 

--enable-thread-safe-client 

--with-mysqld-user=mysql 

--with-big-tables 

--without-debug 

--with-pthread 

--with-extra-charsets=complex 

--with-readline 

--with-ssl 

--with-embedded-server 

--enable-local-infile 

--with-plugins=partition,innobase 

--with-plugin-PLUGIN 

--with-mysqld-ldflags=-all-static 

--with-client-ldflags=-all-static 

make 

make install 

cp support-files/my-small.cnf /etc/my.cnf 

mkdir -p /usr/local/mysql/data 

/usr/local/mysql/bin/mysql_install_db --user=mysql 

chgrp -R mysql /usr/local/mysql 

/usr/local/mysql/bin/mysqld_safe --user=mysql& 

ps -ef |grep mysql 

echo "export PATH=$PATH:/usr/local/mysql/bin/">>/etc/profile 

source /etc/profile 

cp support-files/mysql.server /etc/init.d/mysqld 

chmod 755 /etc/init.d/mysqld 

chkconfig --add mysqld 

service mysqld restart 

cd .. 

mysqladmin -uroot password elain 

mysql -uroot -p 

#apache、php安裝

yum install -y httpd php* 

phpMyAdmin安裝

wget http://cdnetworks-kr-2.dl.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.4.3.1/phpMyAdmin-3.4.3.1-all-languages.tar.gz 

tar zxvf phpMyAdmin-2.11.11-all-languages.tar.gz 

mv phpMyAdmin-2.11.11-all-languages phpmyadmiin 

cp -Rf phpmyadmin /var/www/html/ 

cd /var/www/html/phpmyadmin 

cp config.sample.inc.php config.inc.php 

#配置

vi config.inc.php    #修改以下行 

17 $cfg['blowfish_secret'] = 'elain'; 

31 $cfg['Servers'][$i]['host'] = '127.0.0.1'; 

37 // $cfg['Servers'][$i]['controluser'] = 'root'; 

38 // $cfg['Servers'][$i]['controlpass'] = 'elain'; 

修改以上四行即可

重新開機httpd

用浏覽器通路http://ip/phpadmin  

擴充閱讀:

http://www.phpmyadmin.net(英文站點)

轉載請注明: 轉載自http://www.elain.org

本文轉自 elain2012 51CTO部落格,原文連結:http://blog.51cto.com/elain/663094