phpMyAdmin is a graphical management tool for MySQL that allows you to manage your MySQL database on a web interface, which is not easy and fast.
This installation and configuration is under the CentOS 6.4 system, the system has been deployed LNMP environment. For phpMyAdmin installation, you can choose Yum's online installation or download it on its official website and unzip it to your Web server directory. For the sake of convenience, here is the first method, if a friend wants to know the second method, welcome message.
Installing phpMyAdmin
Yum-y Install phpMyAdmin//perform Yum Online Setup program
After the installation is complete, you can find the phpMyAdmin in the/usr/share directory and copy it to your web directory, for example, my web directory is:/usr/share/nginx/html
Configure phpMyAdmin
Locate phpmyadmin/libraries/config.default.php, copy the file to the phpMyAdmin directory, and rename it to config.inc.php, which has the following items to configure.
$cfg [' pmaabsoluteuri '] = ' http://localhost/phpmyadmin '; Address where the phpMyAdmin is located
$cfg [' Servers '] [$i] [' host '] = ' localhost '; Set the hostname or IP address where MySQL is located, usually by keeping the default localhost
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; Try config in the local tune, otherwise use cookies, it is recommended to use cookies
$cfg [' Servers '] [$i] [' user '] = ' root '; Set the MySQL user name
$cfg [' Servers '] [$i] [' password '] = ' password '; Set the user password for MySQL
$cfg [' defaultlang '] = ' zh-utf-8 '; Setting the default language
After setting the above parameters, save exit and restart the Web server. Open the browser and enter http://localhost/phpMyAdmin in the Address bar to test it.
Two points to be aware of
One
If the "configuration file now requires top secret phrase password (blowfish_secret)" prompt, then please find $cfg[' blowfish_secret '] = '; Set your website's cookie in the following quotation marks, for example: $cfg [' Blowfish_secret '] = ' any character '; This is because of your "$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '.
Two
About the "Unable to create a session on error, check the PHP or Web server logs and properly configure the PHP installation" error.
Cause of Error:
PHP Update, overwriting the original/var/lib/php/session permissions, resulting in Apache users can not write session, resulting in this error.
Workaround:
Execution: #chown-R root:username/var/lib/php/session
Where username is the Apache hosting user, my Apache, so the command executed is:
#chown-R root:apache/var/lib/php/session
If the error message also appears at this point, it is recommended to do:
#chmod-R 777/var/lib/php/session
Afraid 777 of the authority is too large, testing 770, 766, 776 can not solve the above problems, had to give 777 permission.
The workaround for this error is from the network, because I have not encountered this problem, so did not verify its correctness, if there are other issues, welcome message discussion.
Install phpMyAdmin First
Yum-y Install phpMyAdmin
Install it to the/usr/share directory by default and copy it to your Web directory. Mine is:/usr/share/nginx/html
Configure phpMyAdmin
Locate phpmyadmin/libraries/config.default.php, copy the file to the phpMyAdmin directory and rename it to config.inc.php
The file needs to modify the following configuration items:
$cfg [' pmaabsoluteuri '] = ' http://localhost/phpmyadmin '; address where the phpMyAdmin is located
$cfg [' Servers '] [$i] [' host '] = ' localhost '; set the hostname or IP address where MySQL is located , usually by keeping the default localhost
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; try config in the local tune , otherwise use cookies, it is recommended to use cookies
$cfg [' Servers '] [$i] [' user '] = ' root '; set the mysql user name
$cfg [' Servers '] [$i] [' password '] = ' password '; set The user password for MySQL
$cfg [' defaultlang '] = ' zh-utf-8 '; Setting the default language
Modify the restart environment.
Then open the browser input http://localhost/phpMyAdmin test (localhost for own server IP)
Problem:
If the "configuration file now requires top secret phrase password (blowfish_secret)" prompt, then please find $cfg[' blowfish_secret '] = '; Set your website's cookie in the following quotation marks, for example: $cfg [' Blowfish_secret '] = ' any character '; This is because of your "$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '.
About the "Unable to create a session on error, check the PHP or Web server logs and properly configure the PHP installation" error.
PHP Update, overwriting the original /var/lib/php/session permissions, resulting in Apache users cannot write session , this error is generated.
Workaround:
Execution:chown-r root:username/var/lib/php/session
One of the username is nginx bearer user, my is nginx, so the command to execute is:
Chown-r root:nginx/var/lib/php/session
If the error message also appears at this point, it is recommended to do:
Chmod-r 777/var/lib/php/session
If there is an error, the description is an array of session files, it is recommended to do:
Chgrp nginx/var/lib/php/session
Installing and configuring phpMyAdmin in a Linux environment