Install phpmyadmin under Linux server

Install phpmyadmin

1) Pull the installation package from the official website of phpmyadmin and decompress it

wget https://files.phpmyadmin.net/phpMyAdmin/5.0.4/phpMyAdmin-5.0.4-all-languages.zip

unzip phpMyAdmin-5.0.4-all-languages.zip

2) Open the browser and enter the address

http://www.liuyuanshan.top/phpmyadmin/setup/

3) Configure account password
Insert picture description here

4) After completion, click to download the configuration file config.inc.php
5) Put config.inc.php in the root directory of
phpmyadmin 6) Set permissions for the phpmyadmin directory

setfacl -m u:nginx:rwx -R /usr/local/nginx/html/

setfacl -m d:u:nginx:rwx -R /usr/local/nginx/html/

7) Test login

http://www.liuyuanshan.top/phpmyadmin/index.php

Error resolution

Phpmyadmin prompts mysqli_real_connect(): (HY000/2002): No such file or directory error solution

After uploading phpmyadmin to the website directory, it prompts to solve the error of phpmyadmin mysqli_real_connect(): (HY000/2002): No such file or directory. The solution is to change the configuration file config.sample.inc.php in the phpmyadmin directory to config.inc.php
Open and edit config.inc.php to
find:

$cfg['Servers'][$i]['host'] = 'localhost'; 

Change to:

$cfg['Servers'][$i]['host'] = '127.0.0.1'; 

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

Guess you like

Origin blog.csdn.net/weixin_39218464/article/details/114003916
Recommended