PhpMyAdmin configuration details

Source: Internet
Author: User
Tags http authentication php mysql php mysql extension

Note for Mac users: PhP seems to dislike Apple's line feed symbol ("/R "),

Therefore, before saving the configuration file, make sure that your text editor can use Unix line breaks ("/N ").

Configuration prompt: almost all configuration parameters are inConfig. Inc. phpFile.

If this file does not exist, you can find config. Default. php In the libraries directory,

Copy it to the root directory and rename it config. Inc. php.

Parameters related to interface design (such as color) are stored in the themes/themename/layout. Inc. php file.

You can also create the config. footer. Inc. php file and config. header. Inc. php file to add custom code for your site,

The code is displayed in the header and footer.

$ Cfg [pmaabsoluteuri] string

Enter the complete URL of your phpMyAdmin installation directory (including the complete path ).

Example: http://www.your _ web.net/path_to_your_phpmyadmin_directory /.

Note: In Some browsers, URLs are case sensitive. Do not forget the backslash at the end.

From version 2.3.0, you can try not to enter this parameter. PhpMyAdmin can automatically detect the correct configuration.

Users who use port redirection must enter pmaabsoluteuri (If your server is behind the firewall, phpMyAdmin cannot load graphics and style sheets ).

The check method is to browse a table, edit a record, and save it. If phpMyAdmin cannot detect the correct value, the system will prompt an error.

If you see an error message, you must manually set this parameter. If you have other questions, submit them to our bug tracker system. We will improve the code in the future.

$ Cfg [pmanorelation_disablewarning] Boolean

PhpMyAdmin provides support for primary and external data tables (For details, refer to the $ cfg ['servers'] [$ I] ['pmadb'] parameter ).

If you cannot use these functions, refer to the "structure" page of a database. There will be a connection, which will analyze the reasons for these features being disabled for you.

If you do not want to use these functions, set this parameter to true, and this information will not be displayed.

$ Cfg [blowfish_secret] string

Since version 2.5.2, the "cookie" authentication method uses the blowfish algorithm to encrypt passwords.

If you use the "cookie" authentication method, enter a random key here, which is used inside the blowfish algorithm:

You are not prompted to enter it during use. The maximum length of a CMK is 46 characters.

$ Cfg [servers] Array

From version 1.4.2, phpMyAdmin can manage multiple MySQL servers.

Therefore, the $ cfg ['servers'] parameter is added, which is an array containing login information of different servers.

The first $ cfg ['servers'] [$ I] ['host'] parameter is the host name of the first server,

The second $ cfg ['servers'] [$ I] ['host'] parameter is the host name of the second server, and so on.

In the libraries/config. Default. php file, only the first server is defined,

However, you can add more servers in config. Inc. php,

Copy the entire block or the required part (you do not need to define all values, but only the parameters you have modified ).

$ Cfg ['servers'] [$ I] ['host'] string

The host name or IP address of server I, for example, localhost.

$ Cfg ['servers'] [$ I] ['Port'] string

The Port Number of the server I. The default value is 3306 (optional ).

If your host name is "localhost", MySQL will ignore the port number and connect it as a socket.

Therefore, if you need to connect to a different port number, enter "127.0.0.1" or a real host name in $ cfg ['servers'] [$ I] ['host.

$ Cfg ['servers'] [$ I] ['sockets '] string

Socket path. If this parameter is left blank, the default value is used.

$ Cfg ['servers'] [$ I] ['connect _ type'] string

The connection method to the MySQL server. You can select "socket" or "TCP ".

The default value is "TCP". This method can connect almost all MySQL servers, while the sockets method does not support some platforms.

To use the socket method, your MySQL server must be in the same server as the web server.

$ Cfg ['servers'] [$ I] ['extension'] string

PHP MySQL extension used by the phpMyAdmin system:

MySQL: Classic MySQL extension. Default Value and recommended for MySQL 4.0 users.

Mysqli: improved MySQL extension. It is included in PHP 5.0.0 and later versions and is recommended for MySQL 4.1.0 and later versions.

$ Cfg ['servers'] [$ I] ['compus'] Boolean

Whether to use the compression protocol to connect to the MySQL server.

This function requires PHP 4.3.0 or later.

$ Cfg ['servers'] [$ I] ['controluser'] string

$ Cfg ['servers'] [$ I] ['controlpass'] string

This special account has two special functions: Yes, some related functions are available (refer to the $ cfg ['servers'] [$ I] ['pmadb'] parameter );

On a MySQL Server earlier than version 4.1.2 or the MySQL server opened with the -- skip-show-database parameter, enable the Multi-User Function (HTTP or cookie Authentication mode is required ).

If you use the HTTP or cookie Authentication Mode (or use the "Config" Authentication Mode in phpMyAdmin 2.2.1 or later versions ),

You need to set up a MySQL account that only has the select permission for the following table:

MySQL. User table (all fields except the "password" field ),

MySQL. DB table (all fields ),

MySQL. tables_priv table (all fields except the "grantor" and "timestamp" fields ).

This account is used to detect databases that can be viewed by login users.

For more information, see "using authentication modes" in the installation section of this document.

PhpMyAdmin earlier than version 2.2.5. this parameter is called "stduser/stdpass ".

$ Cfg ['servers'] [$ I] ['auth _ type'] string ['http' | 'cooker' | 'config']

Select Config, Cookie, or HTTP authentication.

* 'Config' authentication ($ auth_type = 'config') is the simplest mode. The user name and password are stored in the config. Inc. php file;

* 'Cookies' Authentication Mode ($ auth_type = 'cookies') 2.2.3 or later versions allow you to log on to MySQL using cookies as any valid MySQL user.

The user name and password are stored in the cookie. After cancellation, the password will be deleted. You can also log on to any server (you need to enable the $ cfg ['allowarbitraryserver'] parameter ).

* 'Http' authentication (in earlier versions, it is called 'advanced ') ($ auth_type = 'http') 1.3.0 or later allows you to log on with HTTP-auth as any valid MySQL user.

For more information, see "using authentication modes" in the installation section of this document.

$ Cfg ['servers'] [$ I] ['user'] string

$ Cfg ['servers'] [$ I] ['Password'] string

If auth_type = 'config', phpMyAdmin uses this account to connect to the MySQL server.

If you use HTTP or cookie authentication, do not enter this account.

$ Cfg ['servers'] [$ I] ['only _ db'] string or Array

If you enter a database (or a group of databases), the logged-on user will only see this (or these) database.

Starting from phpMyAdmin 2.2.1, the database name can use the MySQL wildcard ("_" and "% "):

Use a slash to distinguish the two symbols. For example, use 'my/_ db' instead of 'my _ db '.

This function can effectively reduce server load. MySQL server will not create a list of available databases.

However, this function does not overwrite the permission rules of the MySQL server,

Set this parameter to show only these databases. Not all displayed databases can be accessed.

Example of multiple databases

Code

$ Cfg ['servers'] [$ I] ['only _ db'] = array ('db1', 'db2 ');

From phpMyAdmin 2.5.5, the sequence in the array will be used as the database display sequence for the left frame of the page. Therefore, you can arrange your own databases.

If you only want to display several databases at the beginning of the list, regardless of other databases, you do not need to specify all databases.

You only need to enter:

Code

$ Cfg ['servers'] [$ I] ['only _ db'] = array ('db3', 'db4 ','*');

PhpMyAdmin displays db3 and db4 at the beginning, and the others are arranged in the default order.

$ Cfg ['servers'] [$ I] ['hide _ db'] string

Used to hide regular expressions of some databases. These databases are not displayed in the list, and users can still access them.

$ Cfg ['servers'] [$ I] ['verbo'] string

Valid only when the multi-server mode is used. After setting, this string is displayed in the drop-down menu of the home page instead of the host name.

$ Cfg ['servers'] [$ I] ['pmadb'] string

Name of the database that contains the connected table structure.

For more information, see the linked-tables Infrastructure Section.

If you are the only user of phpMyAdmin, you can use your current database to store the special data and enter the current database name.

If your phpMyAdmin configuration is used by multiple users, enter the name of the central database containing the connection table structure.

$ Cfg ['servers'] [$ I] ['bookmarktable'] string

PhpMyAdmin allows you to store frequently used queries in bookmarks starting with version 2.2.0.

How to enable this function:

* Set the pmadb and connection table structure

* Enter the table name in $ cfg ['servers'] [$ I] ['bookmarktable '].

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.