Configure phpMyAdmin_MySQL in CentosLNMP environment

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.