MySQL Study之--MySQL下图形工具的使用(phpMyAdmin) 系统环境: RedHat EL6 数据库: MySQL 5.6.4-m7 php MyAdmin是一个用 PHP 编写的 软件工具 ,是以PHP为基础,以Web-Base方式架构在 网站 主机上的 MySQL 的 数据库管理 工具,让管理者可用Web接口管理
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 [root@mysrv libraries]# rpm -qa |grep mod 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
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
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
其中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造成 !

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The steps to build a MySQL database include: 1. Create a database and table, 2. Insert data, and 3. Conduct queries. First, use the CREATEDATABASE and CREATETABLE statements to create the database and table, then use the INSERTINTO statement to insert the data, and finally use the SELECT statement to query the data.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

MySQL is suitable for beginners because: 1) easy to install and configure, 2) rich learning resources, 3) intuitive SQL syntax, 4) powerful tool support. Nevertheless, beginners need to overcome challenges such as database design, query optimization, security management, and data backup.

Yes,SQLisaprogramminglanguagespecializedfordatamanagement.1)It'sdeclarative,focusingonwhattoachieveratherthanhow.2)SQLisessentialforquerying,inserting,updating,anddeletingdatainrelationaldatabases.3)Whileuser-friendly,itrequiresoptimizationtoavoidper

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version