Installing the phpMyAdmin tool

Source: Internet
Author: User
Tags mysql host phpmyadmin

Objective

phpMyAdmin is a web-based management tool for managing MySQL.

One. Download and configure the phpMyAdmin1. Download phpMyAdmin Package

~]# wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.tar.gz

2. Modify the configuration file:

Expand Packages
~]# tar xf tar xf phpmyadmin-4.0.10.20-all-languages.tar.gz-c/opt
~]# cd/opt
opt]# LN-SV Phpmyadmin-4.0.10.20-all-languages/phpmyadmin

Generate Random string

~]# OpenSSL Rand-hex 16
dd139c3092a3ea7e8909325386656363
~]# cp/opt/phpmyadmin/conf.simple.inc.php/opt/phpmyadmin/conf.inc.php
~]# vim/opt/phpmyadmin/conf.inc.php
$cfg [' blowfish_secret '] = ' 53a2d0539062db50ff4406176ab2faad ';
$cfg [' Servers '] [$i] [' host '] = ' 192.168.196.220 ';

The first configuration is used for cookie authentication; The second parameter is used to set up a MySQL host that needs to be managed.

Two. Configure PHP1. Installing a dependent Package

~]# yum-y Install php php-mysql php-mbstring php-mcrypt php-fpm

2. Start the service

~]# Service PHP-FPM Start

Three. Configure NGINX1. Modifying a configuration file

~]# vim/etc/nginx/conf.d/default.conf

server {    ...    location /phpMyAdmin {        index index.php;        root /opt/phpMyAdmin;        location ~ \.php$ {            fastcgi_index index.php;            fastcgi_pass 127.0.0.1:9000;            fastcgi_param SCRIPT_FILENAME $document_root$script_script_name;            include fastcgi_params;        }    }    ...}

Yes, it can be accessed through http://IP/phpMyAdmin.

2. Reload the configuration file

~]# nginx-t Check grammar
~]# nginx-s Reload Reload configuration file

Four. Assigning MySQL account

Mysql> GRANT all on . To ' php_user ' @ ' 192.168.% ' identified by ' php_pass ';

This command runs on MySQL that needs to be managed. This user name and password are logged in as the user name and password.

Five. Login


PHP connection to MySQL drive, not installed, PHP can not connect to MySQL.

Error 1 encountered. Php-mbstring Package not installed

2. Php-mysql not installed

Resources

PHP configuration file Description: Https://docs.phpmyadmin.net/zh_CN/latest/setup.html#quick-install

Installing the phpMyAdmin tool

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.