Lamp tutorial 2: Use phpMyAdmin to manage MySQL

Source: Internet
Author: User

PhpMyAdmin is written in PHP and can be used to control and operate MySQL databases on the web. PhpMyAdmin can be used to operate databases, such as creating, copying, and deleting data.

 

1. Install phpMyAdmin. You can use the centos epel software source to conveniently install the phpMyAdmin package:

 
[Root @ centos-server ~] $ YumInstallPhpMyAdmin

After phpMyAdmin is installedProgramThe file is in the/usr/share/phpMyAdmin directory, and the corresponding httpd configuration file is in/etc/httpd/CONF. d/phpMyAdmin. conf.

 

2. Configure/etc/httpd/CONF. d/phpMyAdmin. conf. By default, phpMyAdmin does not allow remote access from hosts except localhost:

<Directory/usr/share/PHPmyAdmin/> <ifmodule mod_authz_core.c># Apache2.4<Requireany>Require IP127.0.0.1Require IP ::1</Requireany> </ifmodule> <ifmodule! Mod_authz_core.c># Apache2.2Order deny, allow deny from all allow from127.0.0.1Allow from ::1</Ifmodule> </directory>

To remotely access phpMyAdmin, you can modify the above content:

<Directory/usr/share/PHPmyAdmin/> <ifmodule! Mod_authz_core.c># Apache2.2Order allow, deny allow from all</Ifmodule> </directory>

 

3. Go to the/usr/share/phpMyAdmin directory and create the config. Inc. php file:

 
[Root @ centos-server/usr/share/phpMyAdmin] $CPConfig. sample. Inc. php config. Inc. php

 

4. Restart the HTTPd service:

 
[Root @ centos-server ~] $ Service httpd restart

 

5. OK. Open the website http: // 192.168.12.215/phpMyAdmin (the server address is http: // 192.168.12.215). Enter the MySQL account and password and you will see the phpMyAdmin homepage.

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.