简体   繁体   English

XAMPP中的phpMyAdmin中出现错误#1146

[英]error #1146 in phpMyAdmin in XAMPP

I did something dumb. 我做了些愚蠢的事。 I'd imported the create tables sql file twice. 我已经两次导入了创建表sql文件。 That's not the worst part however. 然而,这并不是最糟糕的部分。 I then proceeded to trying to drop the duplicate tables from the phpMyAdmin database. 然后,我尝试从phpMyAdmin数据库中删除重复的表。 This is all that loads up when I click on phpMyAdmin now: 当我现在单击phpMyAdmin时,这就是全部加载:

Error

SQL query:  Edit

SELECT `tables` 
FROM `phpmyadmin`.`pma_recent` 
WHERE `username` = '[myusername]'

MySQL said: 

#1146 - Table 'phpmyadmin.pma_recent' doesn't exist

As in, just the above on an otherwise blank, white page. 就像上面一样,否则在空白的白页上。

EDIT Everything returns to normal when I comment out the "Advanced Features" section in the config.inc.php file (the red exclamation signs are still beside everything, but I'm starting to wonder if that's just the default icon choice for phpMyAdmin 4.0.1). 编辑当我注释掉config.inc.php文件中的“高级功能”部分时,一切恢复正常(红色的感叹号仍然出现在所有内容的旁边,但是我开始怀疑这是否只是phpMyAdmin 4.0的默认图标选择) .1)。 Once I uncomment them, the above returns. 一旦取消注释,以上内容就会返回。 I've also noticed that the tables seems to be empty (maybe the reason for the exclamation signs?). 我还注意到表似乎是空的(也许是感叹号的原因?)。 Does that mean anything? 那有什么意思吗?

Check whether the tables inside phpMyAdmin database have two underscores __ after the pma prefix. 检查phpMyAdmin数据库中的表在pma前缀之后是否有两个下划线__ If that is the case, update the entries in you config.inc.php with an additional underscore. 如果是这种情况,请使用其他下划线更新config.inc.php中的条目。

It looks like you accidentally dropped one or more of your built-in databases/tables that keep phpmyadmin running. 看来您不小心删除了一个或多个保持phpmyadmin运行的内置数据库/表。 The easiest solution is probably just to re-install XAMPP so you don't leave anything bugged by trying to do patchwork. 最简单的解决方案可能只是重新安装XAMPP,这样您就不会因尝试做补丁而留下任何错误。

Just back up all of your created data. 只需备份所有创建的数据。

I think specifically, you dropped the table that phpmyadmin stores your username in. Now you have no usernames stored in it and therefore you can't log into phpmyadmin. 我想特别是,您删除了phpmyadmin用于存储用户名的表。现在您没有存储用户名,因此无法登录phpmyadmin。

I had the same problem, I'm not too sure why. 我有同样的问题,我不太确定为什么。 Commenting out the advanced parts does work. 注释掉高级部分确实有效。 Probably not the best way to go about it, but I'm sure that works for some people. 可能不是解决此问题的最佳方法,但我确信这对某些人有效。

I got the same issue as you but I found a way to solve it. 我遇到了与您相同的问题,但是找到了解决方法。

from the create_tables.sql you got this: 从create_tables.sql中,您得到了以下信息:

-- Table structure for table pma_recent -表pma_recent表结构

CREATE TABLE IF NOT EXISTS pma__recent ( username varchar(64) NOT NULL, tables text NOT NULL, PRIMARY KEY ( username ) ) COMMENT='Recently accessed tables' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; 如果不存在则创建表pma__recentusername varchar(64)NOT NULL, tables文本NOT NULL,PRIMARY KEY( username ))COMMENT ='最近访问的表'默认字符集utf8 COLLATE utf8_bin;


the table name (pma__recent)contents two underscore characters by default, just remove one of them and recreate all the tables again by copy/paste the script into the SQL tab for phpmyadmin window. 表名(pma__recent)默认包含两个下划线字符,只需删除其中一个下划线字符,然后将脚本复制/粘贴到phpmyadmin窗口的SQL选项卡中,即可重新创建所有表。 You should do the same thing for the others table name. 您应该对其他表名执行相同的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM