Complete steps for configuring and installing phpMyAdmin in CentOs 7.*

  • 2020-09-28 09:19:16
  • OfStack

preface

CentOs installation and configuration phpMyAdmin is actually very simple, the so-called installation actually does not exist, because phpMyAdmin is written by php, so you just need to download the installation package, unzip it, and then you can use it under simple configuration. How to properly configure phpMyAdmin

Installation:

1, the first in phpMyAdmin official website http: / / www phpmyadmin. Download the source code package net/downloads, or through the site to download: / / www ofstack. com codes / 405261. html, after download decompression can be uploaded to the server, or by Linux command to download and install (recommended)


cd /usr/local/src

2. Download phpMyAdmin installation package


wget https://files.phpmyadmin.net/phpMyAdmin/4.6.0/phpMyAdmin-4.6.0-all-languages.tar.gz

3. Unzip the file


tar zxvf phpMyAdmin-4.6.0-all-languages.tar.gz

4. Put phpMyAdmin-4.6.0-ES35en-ES36en in the web directory


mv phpMyAdmin-4.6.0-all-languages /usr/local/nginx/html

5. Rename


mv phpMyAdmin-4.6.0-all-languages phpMyAdmin

Configuration:


cd /usr/local/nginx/html/phpMyAdmin/libraries
vim config.default.php

1. Revise the following three places


$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '123456';

Error:

[

mysqli_real_connect(): (HY000/2002): No such file or directorymysqli_real_connect(): (HY000/2002): No such file or directory

]

Solutions:

The phpmyadmin directory in the configuration file config. sample. inc. php into config. inc. php. And modify the following:


$cfg['Servers'][$i]['host'] = 'localhost';
# to 
$cfg['Servers'][$i]['host'] = '127.0.0.1';

Refreshing the page again will not appear mysqli_real_connect(): (HY000/2002): No such file or directory Error message.

Access:

This project is placed in the nginx test directory html, enter ip:/phpMyAdmin in the browser, and then enter the user name and password.

conclusion


Related articles: