phpMyAdmin Construction Steps
Hint: This environment needs to be built under the condition of LNMP or lamp environment
1. Download the source package
wget https://files.phpmyadmin.net/phpMyAdmin-4.6.4-all-languages.tar.gz
2. Extract the source package to the Web site root directory
[Email protected]:~] $tar-xvzf phpmyadmin-4.6.4-all-languages.tar.gz-c/data/www/
3. Renaming
[Email protected]:~] $MV phpmyadmin-4.6.4-all-languages phpMyAdmin
4. Modify the configuration file (you can add modules based on the number of databases)
[Email protected]:~] $CD/data/www/phpmyadmin
[Email protected]:~]$ cp config.sample.inc.php config.inc.php
[Email protected]:~] $vim config.inc.php
/**
* First Server
*/
$i + +;
$cfg [' Servers '] [$i] [' verbose '] = ' a group ';
$cfg [' Servers '] [$i] [' host '] = ' 192.168.1.1 '; #数据库ip地址
$cfg [' Servers '] [$i] [' port '] = ';
$cfg [' Servers '] [$i] [' socket '] = ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
$cfg [' Servers '] [$i] [' extension '] = ' mysqli ';
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
$cfg [' Servers '] [$i] [' user '] = ' admin ';
$cfg [' Servers '] [$i] [' password '] = ' complex password ';
$cfg [' Servers '] [$i] [' allowroot '] = false;
$cfg [' Servers '] [$i] [' hide_db '] = ' information_schema|mysql|performance_schema|test ';
$i + +;
$cfg [' Servers '] [$i] [' verbose '] = ' two groups ';
$cfg [' Servers '] [$i] [' host '] = ' 192.168.1.2 '; #数据库ip地址
$cfg [' Servers '] [$i] [' port '] = ';
$cfg [' Servers '] [$i] [' socket '] = ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
$cfg [' Servers '] [$i] [' extension '] = ' mysqli ';
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
$cfg [' Servers '] [$i] [' user '] = ' admin ';
$cfg [' Servers '] [$i] [' password '] = ' complex password ';
$cfg [' Servers '] [$i] [' allowroot '] = false;
$cfg [' Servers '] [$i] [' hide_db '] = ' information_schema|mysql|performance_schema|test ';
/**
* PhpMyAdmin Configuration Storage settings.
*/
5. Construction completed
6. Conduct the test
HTTP//Domain/phpmyadmin
The access link here is associated with the name of the extracted directory of the phpMyAdmin modified above
7. phpMyAdmin installation is complete.
Second, HTPASSWD account new and recycling
8.Nginx Access Limit Settings
9. Enter the Nginx configuration file
Add to
Location/{
Auth_basic "Please Input Password ...";
AUTH_BASIC_USER_FILE/USR/LOCAL/NGINX/CONF/HTPASSWD/ZB;
}
10. Create an account and password to verify login
1, cd/usr/local/nginx/conf/
mkdir htpasswd
CD htpasswd
Touch Pma.txt
Htpasswd-b-C pma.txt account password
{
Parameter explanation:
-B means entering a user name and password on the HTPASSSWD command line instead of prompting for a password
-C means creating a new encrypted file
}
The encrypted information of the newly created account with the above command will be written to the new encrypted file Pma.txt
2. Create a new user in the same password file
Htpasswd-b pma.txt account password
11. Account Recycling
htpasswd-d pma.txt Account
12. Re-Login
Http://phpMyAdmin
This will allow you to enter a verified account and password before entering the phpMyAdmin login screen
MySQL Management tools-phpmyadmin setup Steps