phpMyAdmin Configuring multiple MySQL Servers

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

Almost all of the configuration parameters are in the config.inc.php file. 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 to config.inc.php.

  • $cfg [Pmaabsoluteuri] string ,
    • Fill in the full URL of your PhpMyAdmin installation directory (including the full path) here.
    • Starting with version 2.3.0, you can try not to fill out this parameter. The phpMyAdmin can automatically detect the correct configuration.
  • $cfg [Pmanorelation_disablewarning] Boolean,
    • Starting with version 2.3.0, PhpMyAdmin provides support for primary/external data tables (refer to $cfg [' Servers '] [$i] [' pmadb '] parameters).
    • If you cannot use these features, consult the "Structure" page of one of your databases. There will be a connection that will analyze why these features are prohibited.
    • If you do not want to use these features, set this parameter to TRUE and this information will not be displayed.
    • This parameter can not be set
  • $cfg [Blowfish_secret] string
    • Starting with version 2.5.2, the "cookie" authentication method uses the Blowfish algorithm to encrypt the password.
    • 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 key is 46 characters.

  • $cfg [Servers] Array
    • Starting with version 1.4.2, PhpMyAdmin can manage multiple MySQL servers. Therefore, the $cfg [' Servers '] parameter is added, which is an array that includes login information for different servers.
    • $cfg [' Servers '] [$i] [' Host '] string, host name or IP address of the server, such as localhost.
    • $cfg [' Servers '] [$i] [' Port '] string, the port number of the first server. The default is 3306 (you can not fill in).
      • If your hostname is "localhost", MySQL will ignore the port number and connect to the socket.
      • So, if you need to connect a different port number, in $cfg [' Servers '] [$i] [' Host ']
        Fill in the "127.0.0.1" or the real host name.
    • $cfg [' Servers '] [$i] [' socket '] string, socket path. Do not fill in the default value.
    • $cfg [' Servers '] [$i] [' Connect_type '] string
      • You can choose either "Socket" or "TCP" to connect to the MySQL server.
      • The default is "TCP", which can connect almost all MySQL servers, while the sockets mode does not support certain platforms.
      • To use the socket, your MySQL server must be on a server with the WEB server.
    • $cfg [' Servers '] [$i] [' extension '] string, the PHP MySQL extension used by the PhpMyAdmin system:
      • MySQL: the classic MySQL extension. Default value and recommended for MySQL 4.0 users.
      • MYSQLI: Improved MySQL extension. Included in PHP 5.0.0 or later, it is recommended that MySQL 4.1.0 or more users.
    • $cfg [' Servers '] [$i] [' Compress '] Boolean, whether to use the compression protocol to connect to the MySQL server. this feature requires PHP 4.3.0 or later.
    • $cfg [' Servers '] [$i] [' Controluser '] string, $cfg [' Servers ' [$i] [' Controlpass '] string
      • Opens the multiuser feature (requires HTTP or  
        Cookie authentication mode) on the MySQL server under 4.1.2 or the "--skip-show-database" parameter.

        If you use the HTTP or Cookie authentication mode (or the "config" authentication mode in phpMyAdmin 2.2.1 or later), you need to set up a  
        MySQL account, which has only SELECT permissions for the following tables: /p>

        Mysql.user table (except for all fields in the "Password" field),

        mysql.db table (all fields),

        Mysql.tables_priv table (except for "grantor" and "Timestamp All fields of the field).

        This account is used to detect the database that the logged-on user can see.

    • $cfg [' Servers '] [$i] [' Auth_type '] string,
      • Select Config, cookie, or HTTP authentication.
      • ' Config ' authentication ($auth _type = ' config ') is the simplest mode in which the user name and password are stored in the config.inc.php file;
      • The ' Cookie ' authentication mode ($auth _type = ' cookie ') 2.2.3 above allows you to log in via cookies to any legitimate MySQL user. The user name and password are stored in the cookie, and the password is removed after logging off. You can also log on to any server (you need to open the $cfg [' allowarbitraryserver '] parameter).
      • ' HTTP ' authentication (in the old version called ' Advanced ') ($auth _type = ' http ') 1.3.0 above allows you to log in with any valid MySQL user through Http-auth. please refer to "Using Authentication Modes" in the installation section of the documentation for more information.

    • $cfg [' Servers '] [$i] [' User '] string$cfg [' Servers '] [$i] [' Password '] string
        • If auth_type = ' config ', phpMyAdmin will use this account to connect to the MySQL server.
        • If you use HTTP or cookie authentication, please do not fill out this account.
    • $cfg [' Servers '] [$i] [' only_db '] string or array
      • If you fill out a (or a group) database, the logged-on user will only see this (or these) databases.
      • Starting with PhpMyAdmin 2.2.1, the database name can use the MySQL wildcard character ("_" and "%"): Use a slash to differentiate between the two symbols, for example, ' my\_db ' instead of ' my_db '.
      • This feature can effectively reduce the server load and the MySQL server will not establish a list of unusable databases.
      • However, this feature does not override the MySQL server's permission rules, setting this parameter to only show these databases, not all of the displayed database can be accessed.
      • Examples of multiple databases: $cfg [' Servers '] [$i] [' only_db '] = Array (' db3 ', ' DB4 ', ' * ');
    • $cfg [' Servers '] [$i] [' hide_db '] string to hide regular expressions for some databases. These databases simply do not appear in the list, and users can still access them.
    • $cfg [' Servers '] [$i] [' Verbose '] string, only valid when multi-server mode. Once set, this string will appear in the drop-down menu in the first page instead of the hostname.
    • $cfg [' Servers '] [$i] [' pmadb '] string containing the database name that joins the table structure.
      • Please refer to the Linked-tables Infrastructure section of the documentation for more information.
      • If you are the only user of phpMyAdmin, you can use your current database to store these special data and fill in the current database name.
      • If your phpMyAdmin is configured for use by multiple users, fill in the name of the central database that contains the connection table structure here.
    • $cfg [' Servers '] [$i] [' bookmarktable '] string, starting with version 2.2.0, PhpMyAdmin allows you to store frequently used queries in bookmarks.
      • How to open this feature:
        • Set PMADB and join table structure
        • Fill in the table name in $cfg [' Servers '] [$i] [' bookmarktable ']
    • $cfg [' defaultlang '] = ' zh '; Select language default to Chinese, not required, can be automatically recognized
    • $cfg [' defaultcharset '] = ' urf-8 '; --Non-mandatory, automatic recognition

    

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.