首頁 >資料庫 >mysql教程 >开启phpMyAdmin高级功能的设置方法

开启phpMyAdmin高级功能的设置方法

WBOY
WBOY原創
2016-06-07 14:51:021342瀏覽

注:本文基于phpMyAdmin5.5,使用LNMP环境 问题: 登录到phpMyAdmin以后,在主界面的底部,我们发现两条提示信息:一条提示信息是“phpMyAdmin高级功能尚未完全设置,部分功能未激活。请点击这里查看原因”,另外一条信息是“配置文件现在需要一个短语密码。

注:本文基于phpMyAdmin5.5,使用LNMP环境

问题:

<code>登录到phpMyAdmin以后,在主界面的底部,我们发现两条提示信息:
一条提示信息是“phpMyAdmin高级功能尚未完全设置,部分功能未激活。请点击这里查看原因”,另外一条信息是“配置文件现在需要一个短语密码。”
</code>

一旦出现这两条信息,就意味着phpMyAdmin中的部分功能不能使用。解决这个问题的操作步骤分为三部分:上传create_tables.sql文件、配置config.inc.php文件和修改config.default.php文件等。

解决:

1. phpmyadmin数据库创建:

打开phpMyAdmin目录,找到create_tables.sql
cd ./sql
就可以看到create_tables.sql,然后把里面的sql语句copy,然后执行,这样,phpmyadmin数据库就创建成功

2. 配置config.inc.php文件

打开phpMyAdmin文件夹,找到config.sample.inc.php文件,将它重命名为config.inc.php文件。

3. 打开config.inc.php文件,找到下面的语句:

<code class="language-python hljs ">/* Storage database <span class="hljs-keyword">and</span> tables */
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pmadb'</span>] = <span class="hljs-string">'phpmyadmin'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'bookmarktable'</span>] = <span class="hljs-string">'pma__bookmark'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'relation'</span>] = <span class="hljs-string">'pma__relation'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_info'</span>] = <span class="hljs-string">'pma__table_info'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_coords'</span>] = <span class="hljs-string">'pma__table_coords'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pdf_pages'</span>] = <span class="hljs-string">'pma__pdf_pages'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'column_info'</span>] = <span class="hljs-string">'pma__column_info'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'history'</span>] = <span class="hljs-string">'pma__history'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_uiprefs'</span>] = <span class="hljs-string">'pma__table_uiprefs'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'tracking'</span>] = <span class="hljs-string">'pma__tracking'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'designer_coords'</span>] = <span class="hljs-string">'pma__designer_coords'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'userconfig'</span>] = <span class="hljs-string">'pma__userconfig'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'recent'</span>] = <span class="hljs-string">'pma__recent'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'favorite'</span>] = <span class="hljs-string">'pma__favorite'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'users'</span>] = <span class="hljs-string">'pma__users'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'usergroups'</span>] = <span class="hljs-string">'pma__usergroups'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'navigationhiding'</span>] = <span class="hljs-string">'pma__navigationhiding'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'savedsearches'</span>] = <span class="hljs-string">'pma__savedsearches'</span>;</code>

将/* Storage database and tables */语句下面的每一条语句前面的//(双斜杠)和空格全部去掉。

注:
在/* Storage database and tables */句子上面,有下面两行句子:

<code class="language-python hljs ">// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'controluser'</span>] = <span class="hljs-string">'pma'</span>;
// $cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'controlpass'</span>] = <span class="hljs-string">'pmapass'</span>;</code>

如果需要,可以修改为:

<code class="language-python hljs ">$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'controluser'</span>] = <span class="hljs-string">'用户名'</span>;
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'controlpass'</span>] = <span class="hljs-string">'密码'</span>;</code>

4. 修改config.default.php文件

打开phpMyAdmin\libraries\文件夹内的config.default.php文件。
在config.default.php文件内

<code class="language-python hljs "><span class="hljs-number">1</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pmadb'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pmadb'</span>] = <span class="hljs-string">'phpmyadmin'</span>;
<span class="hljs-number">2</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'bookmarktable'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'bookmarktable'</span>] = <span class="hljs-string">'pma__bookmark'</span>;
<span class="hljs-number">3</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'relation'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'relation'</span>] = <span class="hljs-string">'pma__relation'</span>;
<span class="hljs-number">4</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_info'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_info'</span>] = <span class="hljs-string">'pma__table_info'</span>;
<span class="hljs-number">5</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_coords'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_coords'</span>] = <span class="hljs-string">'pma__table_coords'</span>;
<span class="hljs-number">6</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pdf_pages'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'pdf_pages'</span>] = <span class="hljs-string">'pma__pdf_pages'</span>;
<span class="hljs-number">7</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'column_info'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'column_info'</span>] = <span class="hljs-string">'pma__column_info'</span>;
<span class="hljs-number">8</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'history'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'history'</span>] = <span class="hljs-string">'pma__history'</span>;
<span class="hljs-number">9</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_uiprefs'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'table_uiprefs'</span>] = <span class="hljs-string">'pma__table_uiprefs'</span>;
<span class="hljs-number">10</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'tracking'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'tracking'</span>] = <span class="hljs-string">'pma__tracking'</span>;
<span class="hljs-number">11</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'designer_coords'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'designer_coords'</span>] = <span class="hljs-string">'pma__designer_coords'</span>;
<span class="hljs-number">12</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'userconfig'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'userconfig'</span>] = <span class="hljs-string">'pma__userconfig'</span>;
<span class="hljs-number">13</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'recent'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'recent'</span>] = <span class="hljs-string">'pma__recent'</span>;
<span class="hljs-number">14</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'favorite'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'favorite'</span>] = <span class="hljs-string">'pma__favorite'</span>;
<span class="hljs-number">15</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'users'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'users'</span>] = <span class="hljs-string">'pma__users'</span>;
<span class="hljs-number">16</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'usergroups'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'usergroups'</span>] = <span class="hljs-string">'pma__usergroups'</span>;
<span class="hljs-number">17</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'navigationhiding'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'navigationhiding'</span>] = <span class="hljs-string">'pma__navigationhiding'</span>;
<span class="hljs-number">18</span>)查找:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'savedsearches'</span>] = <span class="hljs-string">''</span>;
修改为:
$cfg[<span class="hljs-string">'Servers'</span>][$i][<span class="hljs-string">'savedsearches'</span>] = <span class="hljs-string">'pma__savedsearches'</span>;</code>

提示:
实际上,上面这些句子就是config.inc.php文件中已经去掉//(双斜杠)的句子。

保存并关闭config.default.php文件。

重新登录phpMyAdmin

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn