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)
<? PHP
/* $ 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 the
* $ 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