为什么phpMyAdmin没有完全配置?

时间:2014-08-25 21:03:09

标签: mysql phpmyadmin

在Mac OS X 10.9.4下使用MySQL 5.6.20和phpMyAdmin 4.2.7.1进行localhost安装时,我使用phpmyadmin/examples/create_tables.sql进行了编辑,以激活GRANT SELECT, INSERT, DELETE, UPDATE上所需的phpmyadmin给我的控制用户。

使用下面显示的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的开头,其中一些评论被删除,敏感信息也被遮挡。

<?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 */

2 个答案:

答案 0 :(得分:6)

我不知道phpMyAdmin,所以我不知道该设置应该是怎样的,但无论如何,仅仅看一下这个问题,这里的表格并不一致:

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

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

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

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

所以,是的,MySQL会抱怨:

Table 'phpmyadmin.pma_recent' doesn't exist

因为该表确实不存在。

答案 1 :(得分:2)

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