Use phpMyAdmin in centos to make MySQL database management warm

Source: Internet
Author: User
Tags mysql gui

I have configured MySQL before, and now it's my turn to phpMyAdmin ....

 

Procedure ):

However, the significance of phpMyAdmin is only to make MySQL management easier for non-professionals to understand. Its essence is the execution of SQL commands. In the creation of a MySQL database server, a simple drill was performed on the basic SQL commands.

The gray part below is optional. If you are not able to read it, installation and configuration of phpMyAdmin will not be blocked.

The user interface of the operating system can be divided into GUI mode (graphical mode) and Cui mode (text mode). users who are used to installing the Microsoft Windows operating system PC, basically, there is no chance to access Cui, because in windows, most of the work can be done by mouse control of the form action. In Linux, the X Window System also provides users with a GUI like Microsoft Windows. Both Cui and GUI provide users with a tool to communicate with the operating system kernel. But why can't Cui be replaced by GUI? I think: first, the essence of GUI operations is mostly done by running commands in the background like Cui, it can also be said that CuI makes the user closer to the operating system kernel. Second, Cui is efficient and fast for the server. The existence of the server is nothing more than providing services for the user, however, if the GUI is bulky and consumes a huge amount of system resources, most of the available resources of the server will be used by the system components (GUI) the server loses more than half of the meaning of the server if it returns user requests. This is why all the methods introduced on this site are based on Cui. PhpMyAdmin introduced in this section is similar to the MySQL Gui-you can access the MySQL server through a browser, however, I recommend that you manage your database in the "Cui" way through the fast MYSQL client on the server side.

 

Install phpMyAdmin

Download phpMyAdmin and install phpMyAdmin.

 

I downloaded the package directly from the Internet and then uploaded it to the server,

 

Download link:Http://download.mysql.cn/upload_file/200602/phpMyAdmin-2.7.0-pl2.tar.gz

 

[root @ sample ~] # tar zxvf phpMyAdmin-2.7.0-pl2.tar.gz Expand the compressed tar file
[root @ sample ~] # MV-RF phpMyAdmin-2.7.0-pl2 phpMyAdmin folder name modification, next step is useful ^ _ ^
[root @ sample ~] # CP-RF PHPmyAdmin/var/www/html/ the partition is copied to the corresponding directory (it is best to copy it here, instead of cutting or moving it,

here: http://www.cnblogs.com/puputu/archive/2010/04/28/1722698.html

In addition,/var/www/html/is the path of my Apache website, which can be modified according to different requirements)
[Root @ sample ~] # Rm-F phpMyAdmin-2.7.0-pl2.tar.gz← Delete the legacySource codeFile

Then, install PHP-mbstring so that phpMyAdmin can correctly identify the string.

 

[Root @ sample ~] #  Yum-y install PHP-mbstring ← Install PHP-mbstring online

Setting up install process
Setting up Repositories
Dag 100% | =================================| 1.1 kb
Update 100% | =================================| 951 B
Base 100% | =================================| 1.1 kb
Addons 100% | =============================| 951 B
Extras 100% | =============================| 1.1 kb
Reading repository metadata in from local files
Primary.xml.gz 100% | =======================| 25 KB
Extras: ######################################## ######## 98/98
Added 1 new packages, deleted 0 old in 0.48 seconds
Cing Dag RPM repository for Red Hat Enterprise Linux to supported ded packages only
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for PHP-mbstring to pack into transaction set.
Php-mbstring-4.3.9-3.15. I 100% | =================================| 18 KB
---> Package php-mbstring.i386. 3.9-3.15 set to be updated
--> Running transaction check

Dependencies resolved

 

========================================================== ============================================
Package arch version repository size
========================================================== ============================================
Installing:
Php-mbstring i386 4.3.9-3.15 base 920 K

 

Transaction Summary
========================================================== ============================================
Install 1 package (s)
Update 0 package (s)
Remove 0 package (s)
Total download size: 920 K
Downloading packages:
(1/1): php-mbstring-4.3.9 100% |=========================| 920 KB
Running transaction Test
Finished transaction Test
Transaction test succeeded
Running transaction
Installing: PHP-mbstring ######################### [1/1]

 

Installed: php-mbstring.i386. 3.9-3.15
Complete!

 

Configure phpMyAdmin

Configure phpMyAdmin.

 

[Root @ sample ~] #  CP/var/www/html/PHPmyAdmin/config. Default. php/var/www/html/PHPmyAdmin/config. Inc. php
← Copy the default configuration file template --> Create the application configuration file config. Inc. php
[Root @ sample ~] #  Chmod 660/var/www/html/PHPmyAdmin/config. Inc. php The role changes its attributes to make them writable.

[Root @ sample ~] # VI/var/www/html/PHPmyAdmin/config. Inc. phpModify the phpMyAdmin configuration file

$ cfg ['blowfish _ secret'] = ' enter the password here '; locate this row, and set the corresponding password (this password is only used internally by the Program , not the logon password. The password must be within 46 characters .)

$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config '; Locate this line and change the value of "Config" to "cookie"
Bytes
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker '; The token is changed to this status, so that the authentication method is Cookie.
[Root @ sample ~] # Chown-r root. Apache/var/www/html/PHPmyAdmin/ ← Changes the ownership of phpMyAdmin.

 

 

**************************************** ************************ ***********************************
Then establish the contact between phpMyAdmin and Apache. (In fact, this step is not required, and phpMyAdmin cannot be found in the path shown in the figure. if you really want to configure this in the conf file, you can configure it in the Apache configuration file or download an advanced version of phpMyAdmin. \ phpMyAdmin \ contrib \ packaging \ fedora find the phpMyAdmin-http.conf, change the name and copy it to the following directory (/etc/httpd/CONF. d /),)

 

[Root @ sample ~] #  VI/etc/httpd/CONF. d/phpMyAdmin. conf Secret creates the phpMyAdmin configuration file for Apache to call as follows:
Alias/PHPmyAdmin/var/www/phpMyAdmin  

the following section does not allow users to access and use phpMyAdmin over the Internet, do not add the following parts to the configuration file

order deny, allow
deny from all
allow from 127.0.0.1
allow from 192.168.0

[Root @ sample ~] # /Etc/init. d/httpd restart Restart the HTTP service to make the preceding settings take effect.
Stopping httpd:[ OK ]
Starting httpd: [ OK ]

Note: The preceding <location> </location> label is not added if you want to enable phpMyAdmin for Internet users. For security reasons, only users on the local server and LAN can access phpMyAdmin.

 

**************************************** ************************ ***********************************

However, D is required to restart Apache!

After the restart ....

 

 

 

 

Test phpMyAdmin

Then, perform a simple test on phpMyAdmin.

Enter "http: // server IP Address/PHPmyAdmin/" in the browser (IP address in the LAN). If the following picture is displayed, phpMyAdmin is running.

 

Note that the cookie function of the browser should be set to the accepted status.

When you use a Chinese version browser for access, the page is displayed in Chinese by default. If it is not a Chinese character by default, you can select a Chinese character encoded as gb2312 from the language selection box. Here, the root user in the MySQL server is used as an example (the common user created on the MySQL server can also log on to the database server through phpMyAdmin), as follows:


 
Above, phpMyAdmin can be used to complete some basic database management and database-related user management operations. Its essence is no different from that of SQL commands.

 

Note:

Source of some original articles:Http://www.centospub.com/make/phpmyadmin.html 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.