4 MySQL Management tools 4.1 issues
This case requires the deployment of a set of phpMyAdmin applications based on the lamp platform to enable Web management of the MySQL server.
4.2 Solutions
Use 2 RHEL6 virtual machines + 1 windows 7 real machines, as shown in-2. Where 192.168.4.10 is the MySQL server, the authorization operation is performed on this server, and the other Linux server 192.168.4.6 is deployed on the phpMyAdmin management platform, which implements the Web management mode accessed from the browser.
650) this.width=650; "Src=" http://tts8.tmooc.cn/ttsPage/VIP/VIP_NSD01/MYSQL/DAY04/CASE/01/index.files/ Image002.png "alt=" Image002.png "/>
Figure-2
4.3 steps
The implementation of this case needs to follow the steps below.
Step One: Configure user access authorization on the MySQL server
For the sake of experimentation, the root user is directly allowed to access from the 192.168.4.0/24 network segment, with the password set to 1234567.
Copytextpop-up
-
Mysql> GRANT all on *.* to [Email protected] ' 192.168.4.% ' identified by ' 1234567 '
-
query ok, 0 rows affected ( 0.00 Sec)
Mysql> GRANT All on * * to [e-mail protected] ' 192.168.4.% ' identified by ' 1234567 '; Query OK, 0 rows Affected (0.00 sec)
Step Two: Build phpMyAdmin management Platform (192.168.4.6)
phpMyAdmin is a web-based program that is developed in PHP to manage MySQL databases, so a PHP-enabled Web server is required to use the phpMyAdmin platform properly.
1) Simple deployment of the lamp platform
Install httpd, MySQL, PHP, php-mysql packages directly in Yum, in this case only the MySQL client program, without the need to install the Mysql-server:
Copytextpop-up
[[email protected] ~]# yum -y install httpd mysql php php-MySQL
.. ..
[[email protected] ~]# yum-y install httpd mysql php php-mysql. ..
Since Rhel 6 does not provide the php-mbsring package, and the phpMyAdmin kit requires the relevant library files, additional download of the applicable RPM package (provided by the instructor) is required, and the dependencies can be ignored during installation:
Copytextpop-up
[[email protected] ~]# rpm -ivh php-mbstring-5.3.3-26 . El6. x86_64. RPM -nodeps
.. ..
[Email protected] ~]# RPM-IVH php-mbstring-5.3.3-26.el6.x86_64.rpm-nodeps. ..
After the installation is complete, the HTTPD service configuration is adjusted slightly to start the HTTPD website service:
Copytextpop-up
[[email protected] ~]# vim /etc/httpd/conf/httpd. Conf
ServerName localhost. Localdomain
.. ..
DirectoryIndex index. PHP index. Html
.. ..
[[email protected] ~]# service httpd restart
.. ..
[Email protected] ~]# vim/etc/httpd/conf/httpd.confservername localhost.localdomain. .. DirectoryIndex index.php index.html. .. [Email protected] ~]# service httpd restart. ..
2) Download and deploy the phpMyAdmin suite
Visit http://www.phpmyadmin.net/to download the multi-lingual source code package Phpmyadmin-4.1.2-all-languages.zip.
Unzip the downloaded source package and deploy it to the site directory:
Copytextpop-up
-
[ [email protected] ~] # unzip phpmyadmin< Span class= "Sh_number" >-4.1.2 - all- Languages Zip
-
[ [email protected] ~] # Span class= "Sh_usertype" >mv phpmyadmin-4.1.2 - all- languages / var/ www/ html/ PMA
[Email protected] ~]# unzip Phpmyadmin-4.1.2-all-languages.zip[[email protected] ~]# MV Phpmyadmin-4.1.2-all-languages/var/www/html/pma
Switch to the post-deployment PMA program directory, copy the configuration file, and modify the configuration to correctly specify the IP address of the MySQL server.
Copytextpop-up
[[email protected] ~]# cd /var/www/html/PMA/
[[email protected]dbsvr PMA]# CP config. Sample. Inc. PHP config. Inc. Php
[[email protected]dbsvr PMA]# vim config. Inc. Php
<? Php
.. ..
$cfg[' Servers '] [$i] [' host '] = ' 192.168.4.10 ' ;
.. ..
?>
[[email protected] ~]# Cd/var/www/html/pma/[[email protected] pma]# CP config.sample.inc.php Config.inc.php[[email Protected] pma]# vim config.inc.php<?php. .. $cfg [' Servers '] [$i] [' host '] = ' 192.168.4.10 '; ..? >
3) access to the phpMyAdmin system from the browser
On the Windows 7 client, open the IE Web browser and access the website http://192.168.4.6/pma/index.php where the phpMyAdmin system is deployed to open the phpMyAdmin management platform. 3, enter the correct database username (such as root) and password to log in.
650) this.width=650; "Src=" http://tts8.tmooc.cn/ttsPage/VIP/VIP_NSD01/MYSQL/DAY04/CASE/01/index.files/ Image003.png "alt=" Image003.png "/>
Figure-3
Once the login is successful, the MySQL database can be managed within the scope of authorization, as shown in 4.
650) this.width=650; "Src=" http://tts8.tmooc.cn/ttsPage/VIP/VIP_NSD01/MYSQL/DAY04/CASE/01/index.files/ Image004.png "alt=" Image004.png "/>
MySQL management tool-phpmyadmin management platform Setup