📄 documentation.html
字号:
<li>For additional security in this mode, you may wish to consider the Host authentication <a href="#servers_allowdeny_order" class="configrule"> $cfg['Servers'][$i]['AllowDeny']['order']</a> and <a href="#servers_allowdeny_rules" class="configrule"> $cfg['Servers'][$i]['AllowDeny']['rules']</a> configuration directives.</li> <li>Unlike cookie and http, does not require a user to log in when first loading the phpMyAdmin site. This is by design but could allow any user to access your installation. Use of some restriction method is suggested, perhaps a <a href="#glossary">.htaccess</a> file with the HTTP-AUTH directive or disallowing incoming HTTP requests at one’s router or firewall will suffice (both of which are beyond the scope of this manual but easily searchable with Google).</li></ul><h4 id="swekey">Swekey authentication</h4><p>The Swekey is a low cost authentication USB key that can be used inweb applications.<br /><br />When Swekey authentication is activated, phpMyAdmin requires theusers's Swekey to be plugged before entering the login page (currentlysupported for cookie authentication mode only). Swekey Authentication is disabled by default.<br /><br />To enable it, add the following line to <tt>config.inc.php</tt>:</p><pre>$cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey.conf';</pre><p>You then have to create the <tt>swekey.conf</tt> file that will associateeach user with their Swekey Id. It is important to place this file outsideof your web server's document root (in the example, it is located in <tt>/etc</tt>). A self documented sample file is provided in the <tt>contrib</tt> directory. Feel free to use it with your own users' information.<br /><br />If you want to purchase a Swekey please visit<a href="http://phpmyadmin.net/auth_key">http://phpmyadmin.net/auth_key</a>since this link provides funding for phpMyAdmin.</p><!-- CONFIGURATION --><h2 id="config">Configuration</h2><p> <span class="important">Warning for <acronym title="Apple Macintosh">Mac</acronym> users:</span> PHP does not seem to like <acronym title="Apple Macintosh">Mac</acronym> end of lines character ("<tt>\r</tt>"). So ensure you choose the option that allows to use the *nix end of line character ("<tt>\n</tt>") in your text editor before saving a script you have modified.</p><p> <span class="important">Configuration note:</span> Almost all configurable data is placed in <tt>config.inc.php</tt>. If this file does not exist, please refer to the <a href="#setup">Quick install</a> section to create one. This file only needs to contain the parameters you want to change from their corresponding default value in <tt>libraries/config.default.php</tt>.</p><p> The parameters which relate to design (like colors) are placed in <tt>themes/themename/layout.inc.php</tt>. You might also want to create <i>config.footer.inc.php</i> and <i>config.header.inc.php</i> files to add your site specific code to be included on start and end of each page.</p><dl><dt id="cfg_PmaAbsoluteUri">$cfg['PmaAbsoluteUri'] string</dt> <dd>Sets here the complete <abbr title="Uniform Resource Locator">URL</abbr> (with full path) to your phpMyAdmin installation's directory. E.g. <tt>http://www.your_web.net/path_to_your_phpMyAdmin_directory/</tt>. Note also that the <abbr title="Uniform Resource Locator">URL</abbr> on some web servers are case–sensitive. Don’t forget the trailing slash at the end.<br /><br /> Starting with version 2.3.0, it is advisable to try leaving this blank. In most cases phpMyAdmin automatically detects the proper setting. Users of port forwarding will need to set PmaAbsoluteUri (<a href="https://sf.net/tracker/index.php?func=detail&aid=1340187&group_id=23067&atid=377409">more info</a>). A good test is to browse a table, edit a row and save it. There should be an error message if phpMyAdmin is having trouble auto–detecting the correct value. If you get an error that this must be set or if the autodetect code fails to detect your path, please post a bug report on our bug tracker so we can improve the code.</dd> <dt id="cfg_PmaNoRelation_DisableWarning">$cfg['PmaNoRelation_DisableWarning'] boolean</dt> <dd>Starting with version 2.3.0 phpMyAdmin offers a lot of features to work with master / foreign – tables (see <a href="#pmadb" class="configrule">$cfg['Servers'][$i]['pmadb']</a>). <br /> If you tried to set this up and it does not work for you, have a look on the "Structure" page of one database where you would like to use it. You will find a link that will analyze why those features have been disabled.<br /> If you do not want to use those features set this variable to <tt>TRUE</tt> to stop this message from appearing.</dd> <dt id="cfg_SuhosinDisableWarning">$cfg['SuhosinDisableWarning'] boolean</dt> <dd>A warning is displayed on the main page if Suhosin is detected. You can set this parameter to <tt>TRUE</tt> to stop this message from appearing.</dd> <dt id="cfg_AllowThirdPartyFraming">$cfg['AllowThirdPartyFraming'] boolean</dt> <dd>Setting this to <tt>true</tt> allows a page located on a different domain to call phpMyAdmin inside a frame, and is a potential security hole allowing cross-frame scripting attacks.</dd> <dt id="cfg_blowfish_secret">$cfg['blowfish_secret'] string</dt> <dd>The "cookie" auth_type uses blowfish algorithm to encrypt the password.<br /> If you are using the "cookie" auth_type, enter here a random passphrase of your choice. It will be used internally by the blowfish algorithm: you won’t be prompted for this passphrase. The maximum number of characters for this parameter seems to be 46.<br /><br /> Since version 3.1.0 phpMyAdmin can generate this on the fly, but it makes a bit weaker security as this generated secret is stored in session and furthermore it makes impossible to recall user name from cookie.</dd> <dt id="cfg_Servers">$cfg['Servers'] array</dt> <dd>Since version 1.4.2, phpMyAdmin supports the administration of multiple MySQL servers. Therefore, a <a href="#cfg_Servers" class="configrule">$cfg['Servers']</a>-array has been added which contains the login information for the different servers. The first <a href="#cfg_Servers_host" class="configrule">$cfg['Servers'][$i]['host']</a> contains the hostname of the first server, the second <a href="#cfg_Servers_host" class="configrule">$cfg['Servers'][$i]['host']</a> the hostname of the second server, etc. In <tt>./libraries/config.default.php</tt>, there is only one section for server definition, however you can put as many as you need in <tt>./config.inc.php</tt>, copy that block or needed parts (you don't have to define all settings, just those you need to change).</dd> <dt id="cfg_Servers_host">$cfg['Servers'][$i]['host'] string</dt> <dd>The hostname or <abbr title="Internet Protocol">IP</abbr> address of your $i-th MySQL-server. E.g. localhost.</dd> <dt id="cfg_Servers_port">$cfg['Servers'][$i]['port'] string</dt> <dd>The port-number of your $i-th MySQL-server. Default is 3306 (leave blank). If you use "localhost" as the hostname, MySQL ignores this port number and connects with the socket, so if you want to connect to a port different from the default port, use "127.0.0.1" or the real hostname in <a href="#cfg_Servers_host" class="configrule">$cfg['Servers'][$i]['host']</a>. </dd> <dt id="cfg_Servers_socket">$cfg['Servers'][$i]['socket'] string</dt> <dd>The path to the socket to use. Leave blank for default.<br /> To determine the correct socket, check your MySQL configuration or, using the <tt>mysql</tt> command–line client, issue the <tt>status</tt> command. Among the resulting information displayed will be the socket used.</dd> <dt id="cfg_Servers_ssl">$cfg['Servers'][$i]['ssl'] boolean</dt> <dd>Whether to enable SSL for connection to MySQL server. </dd> <dt id="cfg_Servers_connect_type">$cfg['Servers'][$i]['connect_type'] string</dt> <dd>What type connection to use with the MySQL server. Your options are <tt>'socket'</tt> and <tt>'tcp'</tt>. It defaults to 'tcp' as that is nearly guaranteed to be available on all MySQL servers, while sockets are not supported on some platforms.<br /><br /> To use the socket mode, your MySQL server must be on the same machine as the Web server.</dd> <dt id="cfg_Servers_extension">$cfg['Servers'][$i]['extension'] string</dt> <dd>What php MySQL extension to use for the connection. Valid options are: <br /><br /> <tt><i>mysql</i></tt> : The classic MySQL extension. This is the recommended and default method at this time.<br /><br /> <tt><i>mysqli</i></tt> : The improved MySQL extension. This extension became available with php 5.0.0 and is the recommended way to connect to a server running MySQL 4.1.x or newer.</dd> <dt id="cfg_Servers_compress">$cfg['Servers'][$i]['compress'] boolean</dt> <dd>Whether to use a compressed protocol for the MySQL server connection or not (experimental).<br /> This feature requires PHP >= 4.3.0.</dd> <dt id="controluser"> <span id="cfg_Servers_controluser">$cfg['Servers'][$i]['controluser']</span> string<br /> <span id="cfg_Servers_controlpass">$cfg['Servers'][$i]['controlpass']</span> string </dt> <dd>This special account is used for 2 distinct purposes: to make possible all relational features (see <a href="#pmadb" class="configrule">$cfg['Servers'][$i]['pmadb']</a>) and, for a MySQL server previous to 4.1.2 or running with <tt>--skip-show-database</tt>, to enable a multi-user installation (<abbr title="HyperText Transfer Protocol">HTTP</abbr> or cookie authentication mode).<br /><br /> When using <abbr title="HyperText Transfer Protocol">HTTP</abbr> or cookie authentication modes (or 'config' authentication mode since phpMyAdmin 2.2.1), you need to supply the details of a MySQL account that has <tt>SELECT</tt> privilege on the <i>mysql.user (all columns except "Password")</i>, <i>mysql.db (all columns)</i> and <i>mysql.tables_priv (all columns except "Grantor" and "Timestamp") </i>tables. This account is used to check what databases the user will see at login.<br /> Please see the <a href="#setup">install section</a> on "Using authentication modes" for more information.<br /><br /> In phpMyAdmin versions before 2.2.5, those were called "stduser/stdpass".</dd> <dt id="cfg_Servers_auth_type">$cfg['Servers'][$i]['auth_type'] string <tt>['<abbr title="HyperText Transfer Protocol">HTTP</abbr>'|'http'|'cookie'|'config'|'signon']</tt></dt> <dd>Whether config or cookie or <abbr title="HyperText Transfer Protocol">HTTP</abbr> or signon authentication should be used for this server. <ul><li>'config' authentication (<tt>$auth_type = 'config'</tt>) is the plain old way: username and password are stored in <i>config.inc.php</i>.</li> <li>'cookie' authentication mode (<tt>$auth_type = 'cookie'</tt>) as introduced in 2.2.3 allows you to log in as any valid MySQL user with the help of cookies. Username and password are stored in cookies during the session and password is deleted when it ends. This can also allow you to log in in arbitrary server if <tt><a href="#AllowArbitraryServer" class="configrule">$cfg['AllowArbitraryServer']</a></tt> enabled. </li> <li>'<abbr title="HyperText Transfer Protocol">HTTP</abbr>' authentication (was called 'advanced' in previous versions and can be written also as 'http') (<tt>$auth_type = '<abbr title="HyperText Transfer Protocol">HTTP</abbr>'</tt>) as introduced in 1.3.0 allows you to log in as any valid MySQL user via HTTP-Auth.</li> <li>'signon' authentication mode (<tt>$auth_type = 'signon'</tt>) as introduced in 2.10.0 allows you to log in from prepared PHP session data. This is useful for implementing single signon from another application. Sample way how to seed session is in signon example: <code>scripts/signon.php</code>. You need to configure <a href="#cfg_Servers_SignonSession" class="configrule">session name</a> and <a href="#cfg_Servers_SignonURL" class="configrule">signon URL</a> to use this authentication method.</li> </ul> Please see the <a href="#setup">install section</a> on "Using authentication modes" for more information. </dd> <dt id="servers_auth_swekey_config"> <span id="cfg_Servers_auth_swekey_config">$cfg['Servers'][$i]['auth_swekey_config']</span> string<br /> </dt> <dd> The name of the file containing <a href="#swekey">Swekey</a> ids and login names for hardware authentication. Leave empty to deactivate this feature. </dd> <dt id="servers_user"> <span id="cfg_Servers_user">$cfg['Servers'][$i]['user']</span> string<br /> <span id="cfg_Servers_password">$cfg['Servers'][$i]['password']</span> string
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -