简述:phpMyAdmin 是一个用PHP编写的,可以通过 web 方式控制和操作 MySQL 数据库。通过 phpMyAdmin 可以完全对数据库进行操作,例如建立、复制、删除数据等等。
系统环境:CentOS 5.5 x64
所需软件:
phpMyAdmin-2.11.11-all-languages.tar.gz
mysql-5.0.56.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
- --enable-assembler
- --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
本文链接地址:phpmyadmin-MYSQL管理工具安装
本文转自 elain2012 51CTO博客,原文链接:http://blog.51cto.com/elain/663094