gpt4 book ai didi

mysql - 为什么 phpMyAdmin 没有完全配置?

转载 作者:可可西里 更新时间:2023-11-01 07:02:35 25 4
gpt4 key购买 nike

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

使用如下所示的 config.inc.php,当我启动 phpMyAdmin 时,无论是作为 root 用户还是作为该控制用户,我都会收到错误消息:phpMyAdmin 配置存储未完全配置,一些扩展功能已停用。要找出原因,请单击此处。

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

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

最佳答案

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

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

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

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

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

是的,MySQL 会提示:

Table 'phpmyadmin.pma_recent' doesn't exist

因为该表实际上不存在。

关于mysql - 为什么 phpMyAdmin 没有完全配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25494337/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com