PHPMyadmin configuration file (configuration)

Source: Internet
Author: User
Tags mysql host php error reporting
The content of the PHPMyadmin configuration file config. inc. php is as follows. related comments are added to the configuration. It is very suitable for database managers who are unfamiliar with database operation commands. next I will explain how to install the tool:

1. first download from the internetPhpmyadmin, decompress it to the accessible web directory (if it is a virtual space, decompress it and upload it to the web Directory through ftp). of course, you can modify the name of the file after decompression.

2. configure the config file
Open the config. default. php file under libraries, find the following items in sequence, and configure the items as instructed:
A. visit the website
Reference:
$ Cfg ['pmaabsoluteuri '] = ''; enter the phpmyadmin access url here.

B. mysql host information
Reference:
$ Cfg ['servers'] [$ I] ['host'] = 'localhost'; // MySQL hostname or IP address
Enter the IP address of the localhost or mysql server. if mysql and phpmyadmin are on the same server, press the default localhost
$ Cfg ['servers'] [$ I] ['port'] = ''; // MySQL port-leave blank for default port
Mysql Port. if it is 3306 by default, leave it blank.

C. mysql User name and password
Reference:
$ Cfg ['servers'] [$ I] ['user'] = 'root'; // MySQL user used by phpmyadmin to access the mysql user name
Fg ['servers'] [$ I] ['password'] = ''; // MySQL password (only needed corresponds to the password of the above mysql User name
D. authentication method
Reference:
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker ';
There are four modes available here: cookie, http, HTTP, config
In config mode, you can directly access the phpmyadmin access url without entering the user name and password. it is insecure and is not recommended.
When this option is set to cookie, http, or HTTP, you need to verify the data username and password to log on to phpmyadmin. The details are as follows:
The PHP installation mode is Apache, and http and cookie can be used;
The PHP installation mode is CGI and cookie can be used.

E. set the phrase password (blowfish_secret)
Reference:
$ Cfg ['blowfish _ secret'] = '';
If the authentication method is set to cookie, you need to set the phrase password and the setting password, which is determined by yourself, but cannot be left blank. Otherwise, an error will be prompted when you log on to phpmyadmin.
Okay, so far, you have successfully installed phpmyadmin. easy to use. log on to the console and try again.

Note:
This document only describes the basic configuration of installing phpmyadmin. for details about the configuration parameters in the config. default. php file, you can

PhpMyAdmin is a MySQL database management tool. after the tool is installed, you can directly manage MySQL data in the form of web, instead of executing system commands, it is very suitable for database managers who are unfamiliar with database operation commands. The following describes the installation method of this tool in detail.
1. Download
1. download phpMyAdmin installation package from official site: http://www.phpmyadmin.net/(install all-programming ages in various languages)
2. decompress the package to a web-accessible directory. if it is a virtual space, decompress the package and upload it to the web Directory through ftp, you can also modify the name of the extracted File (you can customize the directory name ).

II. configuration
3. open/libraries/config. default. php file (the old version is config in the root directory. inc. php file), use a Wordpad (do not use notepad, this is UTF8 encoding) for editing, follow the instructions to configure.
4. find $ cfg ['pmaabsoluteuri '] = ''; // modify the phpMyAdmin URL of the space to be uploaded.
For example, $ cfg ['pmaabsoluteuri '] = 'http: // website domain name/phpmyadmin /';
5. search for $ cfg ['servers'] [$ I] ['host'] = 'localhost'; // The default value is usually used, and there are exceptions. you do not need to modify the value.
6. find $ cfg ['servers'] [$ I] ['auth _ type'] = 'config'; // debug config in your own machine; if a cookie is used for the space on the network.
There are four modes available: cookie, http, HTTP, config
① You can directly enter the phpMyAdmin access url in config mode without entering the user name and password. it is insecure and is not recommended.
② Set the cookie, http, and HTTP methods. to log on to phpMyAdmin, you need the data username and password for verification.
Specifically, the PHP installation mode is Apache, and http and cookie can be used. The PHP installation mode is CGI and cookie can be used.
7. search for $ cfg ['servers'] [$ I] ['user'] = 'root'; // MySQL username
8. find $ cfg ['servers'] [$ I] ['password'] = ''; // MySQL password (only leave the needed blank)
9. find $ cfg ['servers'] [$ I] ['only _ db'] = ''; // you can set only one data, set your database name. if you want to set up a server, leave it blank.
10. find $ cfg ['defaultlang '] = 'zh'; // select a language. zh indicates the meaning of simplified Chinese.
11. find $ cfg ['blowfish _ secret'] = ''; // if the authentication method is set to cookie, you need to set the phrase password and the reason for setting the password, you cannot leave this field empty. Otherwise, an error as shown in is prompted when you log on to phpMyAdmin.

12. Save the settings. now you can upload the file to the network space. View http: // website domain name/phpmyadmin/and test it. (Enter the database user name and password)

If the following error occurs during installation: "phpMyAdmin-error: mysqli extension is missing. Check the PHP configuration ." Error.
The solution is as follows:
① Find the $ cfg ['servers'] [$ I] ['extension'] = 'mysql'; statement in the \ libraries \ config. default. php file in the phpmyadmin folder.
② If $ cfg ['servers'] [$ I] ['extension'] = 'mysql'; is found, continue to search for the following $ cfg ['servers'] [$ I] ['extension'] ='Mysqli'; And remove the comment.
③ If $ cfg ['servers'] [$ I] ['extension'] = 'mysql'; is not found, set $ cfg ['servers'] [$ I] ['extension'] ='Mysqli'; Statement, changed to $ cfg ['servers'] [$ I] ['extension'] = 'mysql'; statement. (That is, make sure that the "mysql" value takes effect)


/* $ Id: config. inc. php, v 1.204.2.1 2003/10/10 14:24:24 nijel Exp $ */
// Vim: expandtab sw = 4 ts = 4 sts = 4:

/**
* PhpMyAdmin Configuration File
*
* All directives are explained in Documentation.html
*/


/**
* Sets the php error reporting-Please do not change this line!
*/
If (! Isset ($ old_error_reporting )){
Error_reporting (E_ALL );
@ Ini_set ('display _ errors ', '1 ');
}


/**
* Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* Http://www.your _ web.net/path_to_your_phpMyAdmin_directory/
*
* It must contain characters that are valid for a URL, and the path is
* Case sensitive on some Web servers, for example Unix-based servers.
*
* In most cases you can leave this variable empty, as the correct value
* Will be detected automatically. However, we recommend that you do
* Test to see that the auto-detection code works in your system. A good
* Test is to browse a table, then edit a row and save it. There will be
* An error message if phpMyAdmin cannot auto-detect the correct value.
*
* If the auto-detection code does work properly, you can set to TRUE
* $ Cfg ['pmaabsoluteuri _ DisableWarning '] variable below.
*/
$ Cfg ['pmaabsoluteuri '] = ''; ----- set the URL of your phpmyadmin, for example, http: // localhost/phpmyadmin/


/**
* Disable the default warning about $ cfg ['pmaabsoluteuri '] not being set
* You shoshould use this if and ONLY if the PmaAbsoluteUri auto-detection
* Works perfectly.
*/
$ Cfg ['pmaabsoluteuri _ DisableWarning '] = FALSE;

/**
* Disable the default warning that is displayed on the DB Details Structure page if
* Any of the required Tables for the relationfeatures cocould not be found
*/
$ Cfg ['pmanorelation _ DisableWarning '] = FALSE;

/**
* The 'cooker' auth_type uses blowfish algorithm to encrypt the password. If
* At least one server configuration uses 'cooker' auth_type, enter here
* Passphrase that will be used by blowfish.
$ Cfg ['blowfish _ secret'] = ''; ----- enter the root password.

/**
* Server (s) configuration
*/
$ I = 0;
// The $ cfg ['servers'] array starts with $ cfg ['servers'] [1]. Do not use $ cfg ['servers'] [0].
// You can disable a server config entry by setting host ''.
$ I ++;
$ Cfg ['servers'] [$ I] ['host'] = 'localhost'; // MySQL hostname or IP address ---- you can set the IP address of the remote MySQL server.

$ Cfg ['servers'] [$ I] ['port'] = ''; // MySQL port-leave blank for default port ----- 3306 by default

$ Cfg ['servers'] [$ I] ['sockets '] = ''; // Path to the socket-leave blank for default socket

$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp '; // How to connect to MySQL server ('tcp' or 'socket ') ----- connection to the MySQL server

$ Cfg ['servers'] [$ I] ['companys'] = FALSE; // Use compressed protocol for the MySQL connection
// (Requires PHP> = 4.3.0) ----- whether to use the compression protocol. The PHP version must be greater than or equal to 4.3.0.

$ Cfg ['servers'] [$ I] ['controluser'] = ''; // MySQL control user settings
// (This user must have read-only
$ Cfg ['servers'] [$ I] ['controlpass'] = ''; // access to the" mysql/user"
// And "mysql/db" tables) ----- MySQL controls user settings. this user only has full permissions on the user and db tables in the mysql database.

$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
// Authentication method (config, http or cookie based )? ----- If the PHP installation mode is Apache, http and cookie can be used. if the PHP installation mode is CGI, cookie can be used. the default value is config, which is insecure and is not recommended.

$ Cfg ['servers'] [$ I] ['user'] = 'root'; // MySQL user ----- connect to a user in MySQL

$ Cfg ['servers'] [$ I] ['password'] = '';
// MySQL password (only needed with 'config' auth_type) ----- MySQL connection password. we recommend that you set the root password with phpmyadmin after installing PHP and MySQL, and then enter it here

$ Cfg ['servers'] [$ I] ['only _ db'] = ''; // If set to a db-name, only
// This db is displayed
// At left frame
// It may also be an array
// Of db-names ----- if the name of a database is set here, only the database is displayed on the left of the framework after logging on.

$ Cfg ['servers'] [$ I] ['verbos'] = ''; // verbose name for this host-leave blank to show the hostname

$ Cfg ['servers'] [$ I] ['pmadb'] = ''; // Database used for Relation, Bookmark and PDF Features
// (See scripts/create_tables. SQL)
//-Leave blank for no support
// DEFAULT: 'phpmyadmin'
$ Cfg ['servers'] [$ I] ['bookmarktable'] = ''; // Bookmark table
//-Leave blank for no bookmark support
// DEFAULT: 'PMA _ bookmark'
$ Cfg ['servers'] [$ I] ['relation'] = ''; // table to describe the relation between links (see doc)
//-Leave blank for no relation-links support
// DEFAULT: 'PMA _ relation'
$ Cfg ['servers'] [$ I] ['Table _ info'] = ''; // table to describe the display fields
//-Leave blank for no display fields support
// DEFAULT: 'PMA _ table_info'
$ Cfg ['servers'] [$ I] ['Table _ coords '] = ''; // table to describe the tables position for the PDF schema
//-Leave blank for no PDF schema support
// DEFAULT: 'PMA _ table_coords'
$ Cfg ['servers'] [$ I] ['PDF _ page'] = ''; // table to describe pages of relationpdf
//-Leave blank if you don't want to use this
// DEFAULT: 'PMA _ pai_pages'
$ Cfg ['servers'] [$ I] ['column _ info'] = ''; // table to store column information
//-Leave blank for no column comments/mime types
// DEFAULT: 'PMA _ column_info'
$ Cfg ['servers'] [$ I] ['History '] = ''; // table to store SQL history
//-Leave blank for no SQL query history
// DEFAULT: 'PMA _ history'
$ Cfg ['servers'] [$ I] ['verbose _ check'] = TRUE; // set to FALSE if you know that your pma _ * tables
// Are up to date. This prevents compatibility
// Checks and thereby increases performance.
$ Cfg ['servers'] [$ I] ['lowdeny'] ['order'] // Host authentication order, leave blank to not use
= '';
$ Cfg ['servers'] [$ I] ['lowdeny'] ['rules'] // Host authentication rules, leave blank for ULTS
= Array ();


$ I ++;
$ Cfg ['servers'] [$ I] ['host'] = '';
$ Cfg ['servers'] [$ I] ['port'] = '';
$ Cfg ['servers'] [$ I] ['sockets '] = '';
$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp ';
$ Cfg ['servers'] [$ I] ['compus'] = FALSE;
$ Cfg ['servers'] [$ I] ['controluser'] = '';
$ Cfg ['servers'] [$ I] ['controlpass'] = '';
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
$ Cfg ['servers'] [$ I] ['user'] = 'root ';
$ Cfg ['servers'] [$ I] ['password'] = '';
$ Cfg ['servers'] [$ I] ['only _ db'] = '';
$ Cfg ['servers'] [$ I] ['verbose '] = '';
$ Cfg ['servers'] [$ I] ['pmadb'] = ''; // 'phpmyadmin'-see scripts/create_tables. SQL
$ Cfg ['servers'] [$ I] ['bookmarktable'] = ''; // 'PMA _ bookmark'
$ Cfg ['servers'] [$ I] ['relation'] = ''; // 'PMA _ relation'
$ Cfg ['servers'] [$ I] ['Table _ info'] = ''; // 'PMA _ table_info'
$ Cfg ['servers'] [$ I] ['Table _ coords '] = ''; // 'PMA _ table_coords'
$ Cfg ['servers'] [$ I] ['PDF _ page'] = ''; // 'PMA _ Ma _pages'
$ Cfg ['servers'] [$ I] ['column _ info'] = ''; // 'PMA _ column_info'
$ Cfg ['servers'] [$ I] ['History '] = ''; // 'PMA _ history'
$ Cfg ['servers'] [$ I] ['verbose _ check'] = TRUE;
$ Cfg ['servers'] [$ I] ['lowdeny'] ['order']
= '';
$ Cfg ['servers'] [$ I] ['lowdeny'] ['rules']
= Array ();

$ I ++;
$ Cfg ['servers'] [$ I] ['host'] = '';
$ Cfg ['servers'] [$ I] ['port'] = '';
$ Cfg ['servers'] [$ I] ['sockets '] = '';
$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp ';
$ Cfg ['servers'] [$ I] ['compus'] = FALSE;
$ Cfg ['servers'] [$ I] ['controluser'] = '';
$ Cfg ['servers'] [$ I] ['controlpass'] = '';
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
$ Cfg ['servers'] [$ I] ['user'] = 'root ';
$ Cfg ['servers'] [$ I] ['password'] = '';
$ Cfg ['servers'] [$ I] ['only _ db'] = '';
$ Cfg ['servers'] [$ I] ['verbose '] = '';
$ Cfg ['servers'] [$ I] ['pmadb'] = ''; // 'phpmyadmin'-see scripts/create_tables. SQL
$ Cfg ['servers'] [$ I] ['bookmarktable'] = ''; // 'PMA _ bookmark'
$ Cfg ['servers'] [$ I] ['relation'] = ''; // 'PMA _ relation'
$ Cfg ['servers'] [$ I] ['Table _ info'] = ''; // 'PMA _ table_info'
$ Cfg ['servers'] [$ I] ['Table _ coords '] = ''; // 'PMA _ table_coords'
$ Cfg ['servers'] [$ I] ['PDF _ page'] = ''; // 'PMA _ Ma _pages'
$ Cfg ['servers'] [$ I] ['column _ info'] = ''; // 'PMA _ column_info'
$ Cfg ['servers'] [$ I] ['History '] = ''; // 'PMA _ history'
$ Cfg ['servers'] [$ I] ['verbose _ check'] = TRUE;
$ Cfg ['servers'] [$ I] ['lowdeny'] ['order']
= '';
$ Cfg ['servers'] [$ I] ['lowdeny'] ['rules']
= Array ();

// If you have more than one server configured, you can set $ cfg ['serverdefault']
// To any one of them to autoconnect to that server when phpMyAdmin is started,
// Or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $ cfg ['serverdefault'] * MUST * be
// Set to that server. [color] = red] ----- whether to display all MySQL servers
$ Cfg ['serverdefault'] = 1; // Default server (0 = no default server)
$ Cfg ['server'] = '';
Unset ($ cfg ['servers'] [0]);


/**
* Other core phpMyAdmin settings
*/
$ Cfg ['obgzip '] = 'auto'; // use GZIP output buffering if possible (TRUE | FALSE | 'auto') ----- whether to use GZIP output buffer if necessary

$ Cfg ['persistentconnections'] = FALSE; // use persistent connections to MySQL database ----- whether to use MySQL persistent connection, that is, pconnect

$ Cfg ['exectimelimmit '] = 300; // maximum execution time in seconds (0 for no limit) ----- maximum script execution time, in seconds

$ Cfg ['skiplockedtables '] = FALSE; // mark used tables, make possible to show
// Locked tables (since MySQL 3.23.30)
$ Cfg ['showsql'] = TRUE; // show SQL queries as run ----- the SQL query statement is displayed when the query is run.

$ Cfg ['allowuserdropdatabase'] = FALSE; // show a 'drop database' link to normal users ----- whether to display "delete database" connection to common users

$ Cfg ['confirm'] = TRUE; // Confirm 'drop table' & 'Drop database' ----- whether a confirmation box is displayed before deleting a data TABLE/DATABASE

$ Cfg ['logincookierecall'] = TRUE; // recall previous login cookie auth. mode or not ----- whether to reclaim the cookie in the previous cookie authentication mode

$ Cfg ['usedbsearch'] = TRUE; // whether to enable the "database search" feature
// Or not
$ Cfg ['ignoremultisubmiterrors '] = FALSE; // if set to true, PMA continues computing multiple-statement queries
// Even if one of the queries failed
$ Cfg ['verbosemultisubmit '] = TRUE; // if set to true, PMA will show the affected rows of EACH statement on
// Multiple-statement queries. See the read_dump.php file for hardcoded
// Defaults on how to handle queries a statement may contain!
$ Cfg ['allowarbitraryserver'] = FALSE; // allow login to any user entered server in cookie based auth

Related Article

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.