PHPMyadmin configuration file (configuration) _php Tutorial

Source: Internet
Author: User
Tags mysql host php and mysql php error php error reporting set cookie
Ideal for database administrators who are unfamiliar with database operations commands, here's how to install the tool:

1. First to download onlinephpMyAdmin, and then extracted to the Web directory can be accessed (if it is virtual space, can be extracted via FTP and so upload to the web directory), of course, you can modify the name of the file after decompression.

2. Configure config file
Open the config.default.php file under libraries, locate the following, and then follow the instructions to configure it:
A. Access to the Web site
Reference:
$cfg [' pmaabsoluteuri '] = '; Fill in phpMyAdmin's access URL here

B.mysql Host Information
Reference:
$cfg [' Servers '] [$i] [' host '] = ' localhost '; MySQL hostname or IP address
Fill in the IP address of localhost or MySQL server, and if MySQL and the 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 the default 3306, leave it blank

c.mysql user name and password
Reference:
$cfg [' Servers '] [$i] [' user '] = ' root '; MySQL user access phpmyadmin using the MySQL username
fg[' Servers ' [$i] [' password '] = '; MySQL password (only needed password corresponding to the above MySQL username
D. Authentication methods
Reference:
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
There are four different modes to choose from, Cookie,http,http,config
The Config method is to enter the phpMyAdmin access URL directly, no need to enter the user name and password, is not safe, is not recommended to use.
When the entry is set to Cookie,http or HTTP, the login phpMyAdmin requires a data user name and password for authentication, as follows:
PHP installation mode is Apache, you can use HTTP and cookies;
PHP installation mode is CGI, you can use cookies

E. Setting of the phrase password (blowfish_secret)
Reference:
$cfg [' blowfish_secret '] = ';
If the authentication method is set to a cookie, you will need to set the phrase password, put in the setting why the password, it is up to you to decide, but can not be left blank, or you may be prompted with error when logging in phpMyAdmin
OK, so far, you have successfully installed the phpMyAdmin, simple, quickly login experience it

Description
This document describes only the basic configuration for installing phpMyAdmin, and detailed instructions on each configuration parameter in the config.default.php file can be

PhpMyAdmin is a MySQL database management tool, after the installation of the tool, you can directly manage the MySQL data through the web, without the need to execute system commands to manage, is very suitable for database Operations Command unfamiliar Database manager, the following details the installation method of the tool.
First, download
1, first to the official site Download phpMyAdmin installation package: http://www.phpmyadmin.net/(Installation contains various languages all-languages)
2, re-extract to the Web can access the directory, if it is virtual space, can be extracted through the FTP tool upload to the Web directory, and you can modify the extracted file name (you can customize the directory name).

Second, the configuration
3, open the/libraries/config.default.php file (the old version is the root directory of the config.inc.php file), with WordPad (do not use Notepad, which is UTF8 encoding) for editing, follow the instructions to configure.
4, find $cfg [' Pmaabsoluteuri ']= '; Modify the URL of the phpmyadmin that you will upload to the space
such as: $cfg [' pmaabsoluteuri '] = ' http://website domain name/phpmyadmin/';
5. Find $cfg [' Servers '] [$i] [' host '] = ' localhost '; Usually with the default, there are exceptions, you can not modify
6, find $cfg [' Servers '] [$i] [' auth_type '] = ' config '; Debug in your own machine with config, if the space on the network with a cookie.
Here are four modes to choose from: Cookie,http,http,config
①config mode is to enter the phpMyAdmin access URL directly to enter, no need to enter the user name and password, is not safe, is not recommended to use.
② set cookie,http,http mode, login phpMyAdmin require data user name and password to authenticate.
The following: PHP installation mode for Apache, you can use the HTTP and cookie;php installation mode for CGI, you can use cookies.
7. Find $cfg [' Servers '] [$i] [' user '] = ' root '; MySQL User name
8. Find $cfg [' Servers '] [$i] [' password '] = '; MySQL password (only needed left blank)
9. Find $cfg [' Servers '] [$i] [' only_db '] = '; You only have one data set up, set as your database name, if you want to build a server, then suggest leave blank
10, find $cfg [' defaultlang '] = ' zh '; Here is the language of choice, en stands for Simplified Chinese meaning
11, find $cfg[' blowfish_secret '] = "; If the authentication method is set to a cookie, you will need to set the phrase password, set why the password, by your own discretion, this can not be left blank, otherwise you will be prompted as shown when logging in PhpMyAdmin.

12, set up after the save, can now be uploaded to the network space, browse http://website domain name/phpmyadmin/test. (Enter the user name and password for the database to do so)

If the installation process occurs: "PhpMyAdmin-Error missing mysqli extension. Please check your PHP configuration. Error
Here's how to fix it:
① to the \libraries\config.default.php file in the phpMyAdmin folder: $cfg [' Servers '] [$i] [' extension ']= ' MySQL '; statement.
② If there is found $cfg[' Servers ' [$i] [' extension ']= ' MySQL ', this sentence continues to find the following sentence $cfg[' Servers ' [$i] [' extension ']= 'mysqli'; and remove the notes.
③ if not found $cfg[' Servers ' [$i] [' extension ']= ' MySQL ', put $cfg[' Servers ' [$i] [' extension ']= 'mysqli'; sentence, change to $ cfg[' Servers ' [$i] [' extension ']= ' MySQL '; Statement. (that is, ensure that the "MySQL" value is valid)


/* $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 is explained in documentation.html
*/


/**
* Sets the PHP error reporting-please do don't 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.ne t/path_to_your_phpmyadmin_directory/
*
* It must contain characters that's valid for a URL, and the path is
* C ASE sensitive on some WEB servers, for example unix-based servers.
*
* In most cases you can leave this variable empty, as the correct value
* would be detected automatically. However, we recommend that the "do"
* Test to see this auto-detection code works in your system. A good
* test is for browse a table, then edit a row and save it. There'll 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 the
* $cfg [' pmaabsoluteuri_disablewarning '] V Ariable below.
*/
$cfg [' pmaabsoluteuri '] = ';-----Set your phpMyAdmin URL here, such as: http://localhost/phpmyadmin/


/**
* Disable The default warning about $cfg [' Pmaabsoluteuri '] not being set
* Should use if and only if the Pmaabsoluteuri auto-detection
* Works perfectly.
*/
$cfg [' pmaabsoluteuri_disablewarning '] = FALSE;

/**
* Disable The default warning that's displayed on the DB Details Structure page if
* Any of the required Tables for the relationfeatures could not be found
*/
$cfg [' pmanorelation_disablewarning '] = FALSE;

/**
* the ' cookie ' Auth_type uses blowfish algorithm to encrypt the password. If
* At least one server configuration uses ' Cookies ' auth_type, enter here a
* Passphrase that'll be used by Blowfish.
$cfg [' blowfish_secret '] = ';-----The root password is set.

/**
* 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 to '.
$i + +;
$cfg [' Servers '] [$i] [' host '] = ' localhost '; mysql hostname or IP address----Here you can set the remote MySQL server IP addresses

$cfg [' Servers '] [$i] [' port '] = '; MySQL Port-leave blank for default port-----default is 3306

$cfg [' Servers '] [$i] [' socket '] = '; Path to the Socket-leave blank for default socket

$cfg [' Servers '] [$i] [' connect_type '] = ' TCP '; How to connect to MySQL server (' tcp ' or ' socket ')-----the way to connect MySQL servers

$cfg [' Servers '] [$i] [' compress '] = FALSE; Use compressed protocol for the MySQL connection
(Requires PHP >= 4.3.0)-----Whether to use compression protocol, PHP version must >= 4.3.0

$cfg [' Servers '] [$i] [' controluser '] = '; MySQL Control user Settings
(This user must has Read-only
$cfg [' Servers '] [$i] [' controlpass '] = '; Access to the "Mysql/user"
and "mysql/db" tables)-----MySQL control user settings, the user only has full access to user and DB tables under the MySQL database

$cfg [' Servers '] [$i] [' auth_type '] = ' config ';
authentication method (config, HTTP or cookie based)?-----if PHP installation mode is Apache, you can use HTTP and cookies, if PHP installation mode is CGI, Cookies can be used; The default is config, which is unsafe and not recommended.

$cfg [' Servers '] [$i] [' user '] = ' root '; MySQL user-----mysql connection

$cfg [' Servers '] [$i] [' password '] = ';
MySQL password (only needed with ' config ' auth_type)-----mysql connection password, it is recommended that after installing PHP and MySQL, first use phpMyAdmin to set the root password, and then fill in here

$cfg [' Servers '] [$i] [' only_db '] = '; If set to a db-name, only
This db is displayed
At left Frame
It may also is an array
of Db-names-----If the name of a database is set here, then the left side of the frame will only show this database

$cfg [' Servers '] [$i] [' verbose '] = '; 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_pages '] = '; Table to describe pages of relationpdf
-Leave blank if you don ' t want
DEFAULT: ' Pma_pdf_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
is up to date. This prevents compatibility
Checks and thereby increases performance.
$cfg [' Servers '] [$i] [' Allowdeny '] [' order ']//Host authentication order, leave blank to no use
= '';
$cfg [' Servers '] [$i] [' Allowdeny '] [' rules ']//Host authentication rules, leave blank for defaults
= Array ();


$i + +;
$cfg [' Servers '] [$i] [' host '] = ';
$cfg [' Servers '] [$i] [' port '] = ';
$cfg [' Servers '] [$i] [' socket '] = ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
$cfg [' Servers '] [$i] [' compress '] = 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_pages '] = '; ' Pma_pdf_pages '
$cfg [' Servers '] [$i] [' column_info '] = '; ' Pma_column_info '
$cfg [' Servers '] [$i] [' history '] = '; ' Pma_history '
$cfg [' Servers '] [$i] [' verbose_check '] = TRUE;
$cfg [' Servers '] [$i] [' Allowdeny '] [' order ']
= '';
$cfg [' Servers '] [$i] [' Allowdeny '] [' rules ']
= Array ();

$i + +;
$cfg [' Servers '] [$i] [' host '] = ';
$cfg [' Servers '] [$i] [' port '] = ';
$cfg [' Servers '] [$i] [' socket '] = ';
$cfg [' Servers '] [$i] [' connect_type '] = ' TCP ';
$cfg [' Servers '] [$i] [' compress '] = 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_pages '] = '; ' Pma_pdf_pages '
$cfg [' Servers '] [$i] [' column_info '] = '; ' Pma_column_info '
$cfg [' Servers '] [$i] [' history '] = '; ' Pma_history '
$cfg [' Servers '] [$i] [' verbose_check '] = TRUE;
$cfg [' Servers '] [$i] [' Allowdeny '] [' order ']
= '';
$cfg [' Servers '] [$i] [' Allowdeny '] [' rules ']
= Array ();

If you had more than one server configured, you can set $cfg [' Serverdefault ']
To any one of the them to AutoConnect to this server when PhpMyAdmin is started,
or set it to 0 to is given a list of servers without logging in
If you had only one server configured, $cfg the [' Serverdefault '] *must* be
Set to that server. [color]=red]-----Whether to show 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 ')-----If necessary, use the gzip output buffer

$cfg [' persistentconnections '] = FALSE; Use the persistent connections to MySQL database-----If you are using a MySQL persistent connection, that is, pconnect

$cfg [' exectimelimit '] = 300; Maximum execution time in seconds (0 for No limit)-----maximum script execution times 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-----Display SQL query statements when running queries

$cfg [' allowuserdropdatabase '] = FALSE; Show a ' drop database ' link to normal users-----whether to display a "delete databases" connection to a normal user

$cfg [' Confirm '] = TRUE; Confirm ' drop table ' & ' drop database '-----Whether a confirmation prompt appears before deleting the datasheet/library

$cfg [' logincookierecall '] = TRUE; Recall previous login in Cookie auth. Mode or not-----whether to reclaim cookies from 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 would show the affected rows of each statement on
Multiple-statement queries. See the read_dump.php file for hardcoded
Defaults on what many queries a statement may contain!
$cfg [' allowarbitraryserver '] = FALSE; Allow login to any user entered server in cookie based auth

http://www.bkjia.com/PHPjc/320973.html www.bkjia.com true http://www.bkjia.com/PHPjc/320973.html techarticle Ideal for database administrators who are unfamiliar with database operations commands, here's how to install the tool: 1. First download the phpMyAdmin online, then unzip to the Web directory you can access ...

  • 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.