-
- $cfg['Servers'][$i]['user'] = 'root'; // MySQL user accesses the mysql user name used by phpmyadmin
- fg['Servers'][$i][' password'] = ''; // MySQL password (only neededThe password corresponding to the above mysql user name
Copy code
D.Authentication method
$cfg['Servers'][$i]['auth_type'] = 'cookie';
There are four modes to choose from here, cookie, http, HTTP, config
The config method is to enter the access URL of phpmyadmin to enter directly without entering the user name and password. It is unsafe and not recommended.
When this item is set to cookie, http or HTTP, logging in to phpmyadmin requires a data username and password for verification, as follows:
PHP installation mode is Apache, which can use http and cookies;
PHP installation mode is CGI, cookies can be used
E. Setting of phrase password (blowfish_secret)
$cfg['blowfish_secret'] = '';
If the authentication method is set to cookie, you need to set a phrase password. It is up to you to decide what password to set, but it cannot be left blank, otherwise an error will be prompted when logging in to phpmyadmin.
Installed phpmyadmin successfully.
Instructions:
This document only describes the basic configuration of installing phpmyadmin. Detailed descriptions of each configuration parameter in the config.default.php file can be found
The following is how to install the phpMyAdmin tool.
1. Download
1. First go to the official website to download the phpMyAdmin installation package: http://www.phpmyadmin.net/ (the installation includes all-languages)
2. Unzip it to a directory that can be accessed by the web. If it is a virtual space, you can decompress it and upload it to the web directory through the ftp tool. At the same time, you can modify the name of the decompressed file (you can customize the directory name).
2. Configuration
3. Open the /libraries/config.default.php file (the old version is the config.inc.php file in the root directory), edit it with WordPad (do not use Notepad, this is UTF8 encoding), and configure it according to the instructions. .
4. Find $cfg['PmaAbsoluteUri']=''; // Change it to the URL of phpMyAdmin that you will upload to the space.
For example: $cfg['PmaAbsoluteUri'] ='http: //Website domain name/phpmyadmin/';
5. Search $cfg['Servers'][$i]['host'] ='localhost'; //Usually use the default, there are exceptions, you don't need to modify it.
6. Find $cfg['Servers'][$i]['auth_type'] ='config'; // Use config for debugging on your own machine; if you are on the network, use cookies.
There are four modes to choose from: cookie, http, HTTP, config
① The config method is to enter the access URL of phpMyAdmin to enter directly without entering the user name and password. It is unsafe and not recommended.
② Set cookie, http, HTTP method, and log in to phpMyAdmin. User name and password are required for verification.
The details are as follows: PHP installation mode is Apache, and http and cookies can be used; PHP installation mode is CGI, and cookies can be used.
7. Find $cfg['Servers'][$i]['user'] = 'root'; // MySQL user name
8. Find $cfg['Servers'][$i]['password'] =''; // MySQL password (only needed, leave blank)
9. Find $cfg['Servers'][$i]['only_db'] = ''; // If you only have one data, set it to your database name; if you want to set up a server, it is recommended to leave it blank.
10. Search $cfg['DefaultLang'] = 'zh'; // Here is the language selection, zh represents Simplified Chinese
11. Find $cfg['blowfish_secret'] =''; // If the authentication method is set to cookie, you need to set a phrase password. It is up to you to decide what password to set. You cannot leave it blank here, otherwise you will be prompted when logging in to phpMyAdmin. The error is shown in the picture below.
12. Save after setting up. Now you can upload it to the network space. Browse http://website domain name/phpmyadmin/ to test it. (Just enter the username and password of the database)
If you want to install: "phpMyAdmin - Error The mysqli extension is missing. Please check the PHP configuration." error.
The solution is as follows:
①Go to the librariesconfig.default.php file in the phpmyadmin folder and find: $cfg['Servers'][$i]['extension']='mysql'; statement.
② If you find the sentence $cfg['Servers'][$i]['extension']='mysql';, continue to search for the following sentence $cfg['Servers'][$i]['extension'] ='mysqli'; and remove its comments.
③If the sentence $cfg['Servers'][$i]['extension']='mysql'; is not found, replace $cfg['Servers'][$i]['extension']='mysqli' ; statement, change it to $cfg['Servers'][$i]['extension']='mysql'; statement. (That is, ensure that the " mysql " value can take 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 the
- * $cfg['PmaAbsoluteUri_DisableWarning'] variable below.
- */
- $cfg['PmaAbsoluteUri'] = '';-----这里设置你的phpmyadmin的URL,如:http://localhost/phpmyadmin/
/**
- * Disable the default warning about $cfg['PmaAbsoluteUri'] not being set
- * You should 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 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 'cookie' auth_type, enter here a
- * passphrase that will be used by blowfish.
- $cfg['blowfish_secret'] = '';-----设定好root密码后这里也要填写
/**
- * 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----这里可以设定远程MySQL服务器IP地址
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port-----默认为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')-----连接MySQL服务器的方式
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
- // (requires PHP >= 4.3.0)-----是否使用压缩协议,PHP版本须>= 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控制用户设定,该用户只对mysql数据库下的user和db表有完全权限
$cfg['Servers'][$i]['auth_type'] = 'config';
- // Authentication method (config, http or cookie based)?-----如果PHP安装模式为Apache,可以使用http和cookie;如果PHP安装模式为CGI,可以使用cookie;默认为config,是不安全的,不推荐。
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user-----MySQL connection user
- < ;p>$cfg['Servers'][$i]['password'] = '';
- // MySQL password (only needed with 'config' auth_type)-----MySQL connection password, it is recommended to install it before After PHP and MySQL, first use phpmyadmin to set the root password, and then fill in
$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 you set a database here name, then only this database will be displayed on the left side of the frame after logging in
$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 to use this
- // 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
- // are up to date. This prevents compatibility
- // checks and thereby increases performance.
- $cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use
- = '';
- $cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults
- = array();< /p>
$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 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]-----是否显示所有的MySQL服务器
- $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')-----有必要的话是否使用GZIP输出缓冲
$cfg['PersistentConnections'] = FALSE; // use persistent connections to MySQL database-----是否使用MySQL持久连接,即pconnect
$cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit)-----最大脚本执行时间,单位:秒
$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-----运行查询时显示SQL查询语句
$cfg['AllowUserDropDatabase'] = FALSE; // show a 'Drop database' link to normal users-----是否对普通用户显示“删除数据库”连接
$cfg['Confirm'] = TRUE; // confirm 'DROP TABLE' & 'DROP DATABASE'-----删除数据表/库前是否出现确认提示框
$cfg['LoginCookieRecall'] = TRUE; // recall previous login in cookie auth. mode or not-----是否收回先前cookie认证模式的cookie
$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 many queries a statement may contain!
- $cfg['AllowArbitraryServer'] = FALSE; // allow login to any user entered server in cookie based auth
-
复制代码
|