⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 documentation.html

📁 一个用PHP编写的
💻 HTML
📖 第 1 页 / 共 5 页
字号:
     so no other user should have rights to it).     <br /> <br />     Please look at your scripts/         directory, where you should find a file called <i>create_tables.sql</i>.         (If you are using a Windows server, pay special attention to <a href="#faq1_23">FAQ 1.23</a>).     <br /> <br />         If your MySQL server's version is 4.1.2 or later, please use         <i>create_tables_mysql_4_1_2+.sql</i> instead, for a new installation.     <br /> <br />         If you already had this infrastructure and upgraded to MySQL 4.1.2         or later, please use <i>upgrade_tables_mysql_4_1_2+.sql</i>.     <br /> <br />         You can use your phpMyAdmin to create the tables for you. Please be         aware that you may need special (administrator) privileges to create         the database and tables, and that the script may need some tuning,         depending on the database name.     <br /> <br />      After having imported the <i>create_tables.sql</i> file,      you should specify the table names in your <i>config.inc.php</i> file. The directives         used for that can be found in the <a href="#config">Configuration section</a>.         You will also need to have a controluser with the proper rights to         those tables (see section <i>Using authentication modes</i> below). </p><h3>Upgrading from an older version</h3><p> Simply copy <i>./config.inc.php</i> from your previous installation into the newly    unpacked one. Configuration files from very old versions (2.3.0 or older) may    require some tweaking as some options have been changed or removed.</p><p> You should <strong>not</strong> copy <tt>libraries/config.default.php</tt>    over <tt>config.inc.php</tt> because the default configuration file    is version-specific.</p><p> If you have upgraded your MySQL server from a version older than 4.1.2 to    version 4.1.2 or newer and if you use the pmadb/linked table infrastructure,    you should run the SQL script found in    <tt>scripts/upgrade_tables_mysql_4_1_2+.sql</tt>.</p><h3>Using authentication modes</h3><ul>    <li>HTTP and cookie authentication modes are recommended in a <b>multi-user        environment</b> where you want to give users access to their own        database and don't want them to play around with others.        <br />        Nevertheless be aware that MS Internet Explorer seems to be really        buggy about cookies, at least till version 6. And PHP 4.1.1 is also a        bit buggy in this area!<br />        Even in a <b>single-user environment</b>, you might prefer to use        HTTP or cookie mode so that your user/password pair are not in clear        in the configuration file.<br /><br /></li>    <li>HTTP and cookie authentication modes are more secure: the MySQL        login information does not need to be set in the phpMyAdmin        configuration file        (except possibly for the <a href="#controluser">controluser</a>).        <br />        However, keep in mind that the password travels in plain text, unless        you are using the HTTPS protocol.        <br />        In cookie mode, the password is stored, encrypted with the blowfish        algorithm, in a temporary cookie.        <br /><br /></li>    <li>        Note: starting with phpMyAdmin 2.6.1, this section is only applicable if        your MySQL server is older than 4.1.2,        or is running with <tt>--skip-show-database</tt>.        <br /><br />        For 'HTTP' and 'cookie' modes, phpMyAdmin needs a controluser that has        <b>only</b> the <tt>SELECT</tt> privilege on the <i>mysql.user (all        columns except &quot;Password&quot;)</i>, <i>mysql.db (all        columns)</i>, <i>mysql.host (all columns)</i> and        <i>mysql.tables_priv (all columns except        &quot;Grantor&quot; &amp; &quot;Timestamp&quot;) </i>tables.<br /> You        must specify the details for the <a href="#controluser">controluser</a>        in the <i>config.inc.php</i> file under the        <tt>$cfg['Servers'][$i]['controluser']</tt>&amp;        <tt>$cfg['Servers'][$i]['controlpass']</tt> settings.<br /> The        following example assumes you want to use <tt>pma</tt> as the        controluser and <tt>pmapass</tt> as the controlpass, but <b>this is        only an example: use something else in your file!</b><br /> Of course        you have to replace <tt>localhost</tt> by the webserver's host if it's        not the same as the MySQL server's one.        <pre>GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';GRANT SELECT (    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,    Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,    Execute_priv, Repl_slave_priv, Repl_client_priv    ) ON mysql.user TO 'pma'@'localhost';GRANT SELECT ON mysql.db TO 'pma'@'localhost';GRANT SELECT ON mysql.host TO 'pma'@'localhost';GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)    ON mysql.tables_priv TO 'pma'@'localhost';        </pre>        If you are using an old MySQL version (below 4.0.2), please replace        the first GRANT SELECT query by this one:        <pre>GRANT SELECT (    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv    ) ON mysql.user TO 'pma'@'localhost';        </pre>        ... and if you want to use the many new relation and bookmark        features:        <pre>GRANT SELECT, INSERT, UPDATE, DELETE ON &lt;pma_db&gt;.* TO 'pma'@'localhost';        </pre>        (this of course requires that your <a href="#linked-tables">linked-tables infrastructure</a> be set up).        <br />        Of course, the above queries only work if your MySQL version supports        the GRANT command. This is the case since 3.22.11.    </li>    <li>        Then each of the <i>true</i> users should be granted a set of        privileges on a set of particular databases. Normally you shouldn't        give global privileges to an ordinary user, unless you understand        the impact of those privileges (for example, you are creating        a superuser).<br />        For example, to grant the user <i>real_user</i> with        all privileges on the database <i>user_base</i>:<br />        &nbsp;&nbsp;&nbsp;<tt>GRANT ALL PRIVILEGES ON user_base.* TO 'real_user'@localhost IDENTIFIED BY 'real_password';</tt>        <br />        What the user may now do is controlled entirely by the MySQL user        management system.<br />        With HTTP or cookie authentication mode, you don't need to fill the        user/password fields inside the <tt>$cfg['Servers']</tt> array.<br />    </li></ul><h4>'http' authentication mode</h4><ul>    <li>Was called 'advanced' in versions before 2.2.3.</li>    <li>Introduced in 1.3.0, it uses Basic HTTP authentication method and        allows you to login as any valid MySQL user.</li>    <li>Is supported with most PHP configurations. For IIS (ISAPI) support        using CGI PHP see <a href="#faq1_32">FAQ 1.32</a>, for using with        Apache CGI see <a href="#faq1_35">FAQ 1.35</a>.</li>    <li>See also <a href="#faq4_4">FAQ 4.4</a> about not using the        <i>.htaccess</i> mechanism along with 'http' authentication mode.</li></ul><h4>'cookie' authentication mode</h4><ul>    <li>You can use this method as a replacement for the HTTP        authentication (for example, if you're running IIS).    </li>    <li>Obviously, the user must enable cookies in the browser.</li>    <li>With this mode, the user can truly logout of phpMyAdmin and login back        with the same username.</li>    <li>If you want to login to arbitrary server see    <tt><a href="#AllowArbitraryServer">$cfg['AllowArbitraryServer']</a></tt> directive.</li>    <li>As mentioned in the <a href="#require">requirements</a> section, having the        <tt>mcrypt</tt> extension will speed up access considerably, but is not required.</li></ul><h4>'config' authentication mode</h4><ul>    <li>This mode is the less secure one because it requires you to fill the        <tt><a href="#servers_user">$cfg['Servers'][$i]['user']</a></tt> and        <tt><a href="#servers_user">$cfg['Servers'][$i]['password']</a></tt> fields        (and as a result, anyone who can read your config.inc.php can discover your        username and password).<br />        But you don't need to setup a &quot;controluser&quot; here:        using the <tt><a href="#servers_only_db">$cfg['Servers'][$i]['only_db']</a></tt> might be enough.</li>    <li>In the <a href="#faqmultiuser">ISP FAQ</a> section, there is an entry explaining how to protect        your configuration file.<br /></li>    <li>For additional security in this mode, you may wish to consider the        Host authentication <tt><a href="#servers_allowdeny_order">$cfg['Servers'][$i]['AllowDeny']['order']</a></tt>        and <tt><a href="#servers_allowdeny_rules">$cfg['Servers'][$i]['AllowDeny']['rules']</a></tt> configuration        directives.</li></ul><!-- CONFIGURATION --><a name="config"></a><br /><h2>Configuration</h2><p>    <span class="important">Warning for Mac users:</span> PHP does not seem to like    Mac end of lines character (&quot;<tt>\r</tt>&quot;). So ensure you choose    the option that allows to use the *nix end of line character    (&quot;<tt>\n</tt>&quot;) 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>.    <br /><br />    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><b><a name="cfg_PmaAbsoluteUri"></a>$cfg[PmaAbsoluteUri]</b> string</dt>    <dd>        Sets here the complete URL (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 URL on some web servers are case&#8211;sensitive.        Don&#8217;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://sourceforge.net/tracker/index.php?func=detail&amp;aid=1340187&amp;group_id=23067&amp;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&#8211;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><b><a name="cfg_PmaNoRelation_DisableWarning"></a>$cfg[PmaNoRelation_DisableWarning]</b> 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">$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 &quot;Structure&quot; 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><b><a name="cfg_blowfish_secret"></a>$cfg[blowfish_secret]</b> string</dt>    <dd>        Starting with version 2.5.2, 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.  </dd>    <dt><b><a name="cfg_Servers"></a>$cfg[Servers]</b> array</dt>    <dd>        Since version 1.4.2, phpMyAdmin supports the administration of multiple        MySQL servers.        Therefore, a $cfg['Servers']-array has been added which contains        the login information for the different servers. The first        <tt>$cfg['Servers'][$i]['host']</tt> contains the hostname of the first        server, the second <tt>$cfg['Servers'][$i]['host']</tt> 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><b><a name="cfg_Servers_host"></a>$cfg['Servers'][$i]['host']</b> string</dt>    <dd>        The hostname or IP address of your $i-th MySQL-server. E.g. localhost.    </dd>    <dt><b><a name="cfg_Servers_port"></a>$cfg['Servers'][$i]['port']</b> string</dt>    <dd>        The port-number of your $i-th MySQL-server. Default is 3306 (leave        blank). If you use &quot;localhost&quot; 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        &quot;127.0.0.1&quot; or the real hostname in        $cfg['Servers'][$i]['host'].    </dd>    <dt><b><a name="cfg_Servers_socket"></a>$cfg['Servers'][$i]['socket']</b> string</dt>    <dd>        The path to the socket to use. Leave blank for default.    </dd>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -