Configure phpMyAdmin LNMPCentOS in CentosLNMP environment
1. download PHPMYADMIN from the main site of phpmyadmin
Http://www.phpmyadmin.net/home_page/downloads.php
Decompress the package and copy the phpmyadmin file to the workspace.
2. configure phpmyadmin
Find phpmyadmin/libraries/config. default. php, copy the file to the phpmyadmin directory, and rename it config. inc. php. The file contains the following configuration items.
$ Cfg ['pmaabsoluteuri '] = 'http: // localhost/phpmyadmin'; // address of phpmyadmin
$ Cfg ['servers'] [$ I] ['host'] = 'localhost'; // Set the host name or IP address of the mysql instance. the default localhost is usually used.
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cookier'; // use config for local debugging; otherwise, use cookie. cookie is recommended.
$ Cfg ['servers'] [$ I] ['user'] = 'root'; // Set the mysql user name
$ Cfg ['servers'] [$ I] ['password'] = 'password'; // Set the mysql User password
$ Cfg ['defaultlang '] = 'zh-utf-8'; // set the default language
After setting the preceding parameters, save and exit and restart the web server. Open the browser, and enter http: // localhost/phpMyAdmin in the address bar to test it.
Two notes
I,
If the prompt "the configuration file requires a top secret phrase password (blowfish_secret)" appears, find $ cfg ['blowfish _ secret'] = ''; set the cookie of your website in the quotation marks, for example, $ cfg ['blowfish _ secret'] = 'arbitrary characters '; this is because your "$ cfg ['servers'] [$ I] ['auth _ type'] = 'cookies.
II,
For the error "cannot create a session when an error occurs, check the PHP or website server log and correctly configure PHP Installation.
Error cause:
After php is updated, the original/var/lib/php/session permissions are overwritten. This error occurs because apache users cannot write data to the session.
Solution:
Run: # chown-R root: username/var/lib/php/session
Here, username is the bearer user of apache, and my is apache, so the command to be executed is:
# Chown-R root: apache/var/lib/php/session
If the error message appears at this time, we recommend that you:
# Chmod-R 777/var/lib/php/session
For fear that 777 of permissions are too large, the above problems cannot be solved by testing 770, 766, and 776, so we have to grant 777 permissions first.