【问题标题】:Why is phpMyAdmin not completely configured?为什么 phpMyAdmin 没有完全配置好?
【发布时间】:2014-10-19 02:25:27
【问题描述】:

在 Mac OS X 10.9.4 下通过本地主机安装 MySQL 5.6.20 和 phpMyAdmin 4.2.7.1,我使用了phpmyadmin/examples/create_tables.sql,并对其进行了编辑,以便在phpmyadmin 上为我的控制用户激活所需的GRANT SELECT, INSERT, DELETE, UPDATE。

使用下面显示的 config.inc.php,当我启动 phpMyAdmin 时,无论是作为 root 用户还是作为该控制用户,我都会收到错误消息: The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.

该链接显示一长串配置设置不正确,包括:

$cfg['Servers'][$i]['relation'] ... 
$cfg['Servers'][$i]['table_info'] ..
$cfg['Servers'][$i]['table_coords'] ...

$cfg['Servers'][$i]['userconfig'] ...

但我确实在config.inc.php 中设置了这些。

在主 phpMyadmin 窗口中,在执行的查询显示中,我看到:

[error] => Table 'phpmyadmin.pma_recent' doesn't exist
[count] => 1
[query] =>  SELECT `tables` FROM `phpmyadmin`.`pma_recent` WHERE `username` = 'root'

然而,当我从命令行运行 mysql -u root -p,然后运行 ​​use phpmyadmin; 和 show tables; 时,我获得了列表:

+-----------------------+
| Tables_in_phpmyadmin  |
+-----------------------+
| pma__bookmark         |
| pma__column_info      |
| pma__designer_coords  |
| pma__history          |
| pma__navigationhiding |
| pma__pdf_pages        |
| pma__recent           |
| pma__relation         |
| pma__savedsearches    |
| pma__table_coords     |
| pma__table_info       |
| pma__table_uiprefs    |
| pma__tracking         |
| pma__userconfig       |
| pma__usergroups       |
| pma__users            |
+-----------------------+

怎么了?

(我确实在phpMyAdmin - config.inc.php configuration? 看到了“答案”,但没有任何帮助。)

这是config.inc.php 的开头,部分 cmets 被剥离,敏感信息被隐藏。

<?php
$cfg['blowfish_secret'] = 'my secret';

/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'my localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '/tmp/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controluser'] = 'mypmacontroluser';
$cfg['Servers'][$i]['controlpass'] = 'mypassword';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$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]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';

/* End of servers configuration */

【问题讨论】:

    标签: mysql phpmyadmin


    【解决方案1】:

    我不知道phpMyAdmin,所以我不知道应该如何设置,但无论如何,单看问题,这里的表命名不一致:

    $cfg['Servers'][$i]['recent'] = 'pma_recent';
    

    用一 (1) 个下划线拼写。

    根据 SHOW TABLES,表格本身用两 (2) 个下划线拼写。

    +-----------------------+
    | Tables_in_phpmyadmin  |
    +-----------------------+
    ...
    | pma__recent           |
    

    所以是的,MySQL 会抱怨:

    Table 'phpmyadmin.pma_recent' doesn't exist
    

    因为表,真的,不存在。

    【讨论】:

    • 谢谢你,@Marc Alff:你的眼光很敏锐;我从来没有抓住那个。 (我重新输入了config.inc.php 中的条目,而不是从config.sample.inc.php 复制它们。此外,我被trac.macports.org/wiki/howto/MAMP 使用单下划线误导了,而文件phpmyadmin/examples/create_tables.sql 确实使用双下划线。)
    【解决方案2】:

    不要手动创建该文件。通过浏览器使用设置向导创建一个有效的配置。

    【讨论】:

    • 是的,这是最简单的方法,谢谢。 (我已经通过将“pma”之后的单下划线更改为双下划线来解决了这个问题。)
    猜你喜欢
    • 2016-02-22
    • 2014-03-24
    • 2017-08-08
    • 2018-01-09
    • 1970-01-01
    • 1970-01-01
    • 2016-05-01
    • 2014-09-07
    • 2011-06-18
    相关资源
    最近更新 更多