Home Database Mysql Tutorial MySQLStudy之--MySQL下图形工具的使用(phpMyAdmin)_MySQL

MySQLStudy之--MySQL下图形工具的使用(phpMyAdmin)_MySQL

Jun 01, 2016 pm 12:59 PM

phpmyadmin

MySQL Study之--MySQL下图形工具的使用(phpMyAdmin)
系统环境:RedHat EL6 数据库: MySQL 5.6.4-m7
phpMyAdmin是一个用PHP编写的软件工具,是以PHP为基础,以Web-Base方式架构在网站主机上的MySQL的数据库管理工具,让管理者可用Web接口管理MySQL数据库。借由此Web接口可以成为一个简易方式输入繁杂SQL语法的较佳途径,尤其要处理大量资料的汇入及汇出更为方便。其中一个更大的优势在于由于phpMyAdmin跟其他PHP程式一样在网页服务器上执行,但是您可以在任何地方使用这些程式产生的HTML页面,也就是于远端管理MySQL数据库,方便的建立、修改、删除数据库及资料表。也可借由phpMyAdmin建立常用的php语法,方便编写网页时所需要的sql语法正确性。
在Linux环境下安装和配置phpMyAdmin需要安装Apache、PHP、MySQL,这些软件可以通过RPM包方式或源代码方式安装,本案例是以RPM方式安装: 一、准备应用环境,安装如下软件: 1、Apache [root@mysrv libraries]# rpm -qa |grep httpd
httpd-tools-2.2.15-26.el6.x86_64
httpd-manual-2.2.15-26.el6.noarch
httpd-2.2.15-26.el6.x86_64
Copy after login
<strong>[root@mysrv libraries]# rpm -qa |grep mod</strong>
mod_auth_pgsql-2.0.3-10.1.el6.x86_64
mod_authz_ldap-0.26-16.el6.x86_64
xorg-x11-drv-modesetting-0.5.0-1.el6.x86_64
PackageKit-gtk-module-0.5.8-21.el6.x86_64
module-init-tools-3.9-21.el6.x86_64
mod_auth_kerb-5.4-9.el6.x86_64
mod_wsgi-3.2-3.el6.x86_64
mod_ssl-2.2.15-26.el6.x86_64
mod_dnssd-0.6-2.el6.x86_64
mod_perl-2.0.4-10.el6.x86_64
mod_auth_mysql-3.0.0-11.el6_0.1.x86_64
Copy after login
2、mysql
[root@mysrv libraries]# rpm -qa |grep mysql
mysql-5.1.66-2.el6_3.x86_64
mysql-bench-5.1.66-2.el6_3.x86_64
mysql-devel-5.1.66-2.el6_3.x86_64
mysql-libs-5.1.66-2.el6_3.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
qt-mysql-4.6.2-25.el6.x86_64
php-mysql-5.3.3-22.el6.x86_64
mysql-devel-5.1.66-2.el6_3.i686
mysql-libs-5.1.66-2.el6_3.i686
mysql-connector-java-5.1.17-6.el6.noarch
mysql-server-5.1.66-2.el6_3.x86_64
mod_auth_mysql-3.0.0-11.el6_0.1.x86_64
mysql-test-5.1.66-2.el6_3.x86_64
Copy after login
3、php
[root@mysrv libraries]# rpm -qa |grep php
php-pecl-memcache-3.0.5-4.el6.x86_64
php-pgsql-5.3.3-22.el6.x86_64
php-cli-5.3.3-22.el6.x86_64
php-pdo-5.3.3-22.el6.x86_64
php-mysql-5.3.3-22.el6.x86_64
php-pecl-apc-3.1.9-2.el6.x86_64
php-ldap-5.3.3-22.el6.x86_64
php-mbstring-5.3.3-46.el6_6.x86_64
php-pear-1.9.4-4.el6.noarch
php-xml-5.3.3-22.el6.x86_64
php-5.3.3-22.el6.x86_64
php-gd-5.3.3-22.el6.x86_64
php-soap-5.3.3-22.el6.x86_64
php-common-5.3.3-22.el6.x86_64
php-odbc-5.3.3-22.el6.x86_64
php-xmlrpc-5.3.3-22.el6.x86_64
Copy after login
其中php-mbstring,在RedHat的安装光盘中没有,需要从网上下载后安装,安装后需要以下配置: [root@mysrv libraries]# echo ‘extension=mbstring.so' >>/etc/php.ini #根据php安装目录而定
[root@mysrv libraries]# service httpd restart
以上软件包安装完成后,就可以进入phpMyAdmin的安装和配置了
二、安装和配置phpMyAdmin 1、下载安装和配置phpMyAdmin 1)先到 phpMyAdmin的官方站上下载最近的 phpMyAdmin
https://www.phpmyadmin.net/downloads/ 下载版本:phpMyAdmin-4.4.11-all-languages.tar.gz
2)将软件包解压到/var/www/html
# tar zxvf phpMyAdmin-4.4.11-all-languages.tar.gz -C /var/www/html
3) 修改目录名为 phpMyAdmin
# mv phpMyAdmin-4.4.11-all-languages phpMyAdmin [root@mysrv oracle]# ls -l /var/www/html/
total 8
-rw-r--r-- 1 root root 17 Jul 15 14:21 index.php
drwxr-xr-x 10 root root 4096 Jul 14 17:45 phpMyAdmin 4) 配置phpMyAdmin
1、编辑. /libraries/config.default.php文件
2、查找 $cfg['Servers'][$i]['host'] = 'localhost'; 如果允许客户端远程管理,将“localhost”改为服务器ip $cfg['Servers'][$i]['host'] = '192.168.8.24';
3、查找 $cfg['Servers'][$i]['auth_type'] = 'config';
在自己的机子里调试用config;如果在网络上的空间用cookie,这里我们既然在前面已经添加了网址,就修改成cookie ,这里建议使用cookie. $cfg['Servers'][$i]['auth_type'] = 'cookie';
4、查找 $cfg['Servers'][$i]['user'] = 'root'; // MySQL user(mysql用户名,自己机里用root;) $cfg['Servers'][$i]['user'] = 'root';
5、查找 $cfg['Servers'][$i]['password'] = ''; // MySQL password (mysql用户的密码,自己的服务器一般都是mysql用户root的密码) $cfg['Servers'][$i]['password'] = 'oracle';
6、查找 $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only(你只有一个数据就设置一下;如果你在本机或想架设服务器,那么建议留空) $cfg['Servers'][$i]['only_db'] = '';
7、查找 $cfg['DefaultLang'] = 'zh'; (这里是选择语言,zh代表简体中文的意思,这里不知道填gbk对否) $cfg['DefaultLang'] = 'en';
8、设置完毕后保存
如果出现“配置文件现在需要绝密的短语密码(blowfish_secret)”那么请在$cfg['blowfish_secret'] = ' ';的等号里面设置你网站的cookie,例如:$cfg['blowfish_secret'] = '任意字符';这是因为你的“$cfg['Servers'][$i]['auth_type'] = 'cookie'的原因。
三、测试
开启浏览器,http://192.168.8.24/phpMyAdmin
\
图一:登陆界面 \
图二:管理界面
----至此,phpMyAdmin已经配置成功!
注意: \
以上,错误,是因为在linux下没有安装和配置php-mbstring造成 !
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain InnoDB Full-Text Search capabilities. Explain InnoDB Full-Text Search capabilities. Apr 02, 2025 pm 06:09 PM

InnoDB's full-text search capabilities are very powerful, which can significantly improve database query efficiency and ability to process large amounts of text data. 1) InnoDB implements full-text search through inverted indexing, supporting basic and advanced search queries. 2) Use MATCH and AGAINST keywords to search, support Boolean mode and phrase search. 3) Optimization methods include using word segmentation technology, periodic rebuilding of indexes and adjusting cache size to improve performance and accuracy.

How do you alter a table in MySQL using the ALTER TABLE statement? How do you alter a table in MySQL using the ALTER TABLE statement? Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

When might a full table scan be faster than using an index in MySQL? When might a full table scan be faster than using an index in MySQL? Apr 09, 2025 am 12:05 AM

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

How do I configure SSL/TLS encryption for MySQL connections? How do I configure SSL/TLS encryption for MySQL connections? Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)? Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

Difference between clustered index and non-clustered index (secondary index) in InnoDB. Difference between clustered index and non-clustered index (secondary index) in InnoDB. Apr 02, 2025 pm 06:25 PM

The difference between clustered index and non-clustered index is: 1. Clustered index stores data rows in the index structure, which is suitable for querying by primary key and range. 2. The non-clustered index stores index key values ​​and pointers to data rows, and is suitable for non-primary key column queries.

How do you handle large datasets in MySQL? How do you handle large datasets in MySQL? Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

See all articles