MySQL #1146 - 表 'phpmyadmin.pma_recent' 不存在

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12760394/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 15:06:29  来源:igfitidea点击:

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

mysqldatabasephpmyadmin

提问by Hoody

Solution Guys...

解决方案 伙计们...

FYI i am using xampp to use phpmyadmin. and this error happens during the process of creating a database on localhost. Below is the code for config.inc file under phpmyadmin directory:

仅供参考,我正在使用 xampp 来使用 phpmyadmin。这个错误发生在本地主机上创建数据库的过程中。下面是phpmyadmin目录下config.inc文件的代码:

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE      AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'HTTP';
$cfg['Servers'][$i]['user'] = 'root'; 
$cfg['Servers'][$i]['password'] = 'password';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$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]['designer_coords'] = 'pma_designer_coords';
//$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
//$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
//$cfg['Servers'][$i]['recent'] = 'pma_recent';
//$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

/*
 * End of servers configuration
 */

?>

回答by Andrea Perdicchia

i've resolved with

我已经解决了

sudo dpkg-reconfigure phpmyadmin

回答by Eduardo Reveles

You have to run the create_tables.sql inside the examples/ folder on phpMyAdmin to create the tables needed for the advanced features. That or disable those features by commenting them on the config file.

您必须在 phpMyAdmin 上的 examples/ 文件夹中运行 create_tables.sql 以创建高级功能所需的表。通过在配置文件中注释它们来禁用或禁用这些功能。

回答by gvsrepins

"You have to run the create_tables.sql inside the examples/ folder on phpMyAdmin to create the tables needed for the advanced features. That or disable those features by commenting them on the config file".

“您必须在 phpMyAdmin 上的 examples/ 文件夹中运行 create_tables.sql 以创建高级功能所需的表。或者通过在配置文件中注释它们来禁用这些功能”。

/usr/share/doc/phpmyadmin/examples/

Only to complete de choosed answer, this is the path to the examples/ directory on Ubuntu.

仅用于完成选择的答案,这是 Ubuntu 上 examples/ 目录的路径。

Just use the import feature and choose "create_tables.sql.gz".

只需使用导入功能并选择“create_tables.sql.gz”。

回答by kukinsula

I encountered the same problem but none of your answers solved it. But I found this link. I had to edit /etc/phpmyadmin/config.inc.php:

我遇到了同样的问题,但你的答案都没有解决它。但我找到了这个链接。我不得不编辑/etc/phpmyadmin/config.inc.php:

$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';

into

进入

$cfg['Servers'][$i]['pma__table_uiprefs'] = ‘pma__table_uiprefs';

My problem was solved, hope it can help others.

我的问题解决了,希望它可以帮助其他人。

回答by Abdennour TOUMI

You will find create_tables.sql.gzfile in /usr/share/doc/phpmyadmin/examples/dir

你会create_tables.sql.gz/usr/share/doc/phpmyadmin/examples/目录中找到文件

enter image description here

在此处输入图片说明

Extract it and change pma_prefix by pma__or vice versa

提取它并更改pma_前缀,pma__反之亦然

enter image description here

在此处输入图片说明

Then import you new script SQL :

然后导入你的新脚本 SQL :

enter image description here

在此处输入图片说明

回答by Abdennour TOUMI

After I downloaded phpmyadmin from their website, I extracted the create_tables.sqlfile from the examples folderand then I imported it from the 'Import'tab of phpmyadmin.
It creates the database 'phpmyadmin' and the relevant table within.

从他们的网站下载 phpmyadmin 后,我create_tables.sql示例文件夹中提取了文件,然后从phpmyadmin的“导入”选项卡中导入了它。
它创建数据库“phpmyadmin”和其中的相关表。

This step might not be needed as the 12 tables were already there...
The problem seemed to be the double underscore in the tables' names.

这一步可能不需要,因为 12 个表已经存在......
问题似乎是表名称中的双下划线。

I edited 'config.inc.php'and added another underscore (__) after the 'pma_'prefix of the tables.

我编辑'config.inc.php'并在表__'pma_'前缀后添加了另一个下划线 ( ) 。

ie.

IE。

$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';

became

变成了

$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';

This solved the issue for me.

这为我解决了这个问题。

回答by Kamil Dziedzic

Just to complete the answer - on Ubuntu/Mint you can just run:

只是为了完成答案 - 在 Ubuntu/Mint 上你可以运行:

zcat /usr/share/doc/phpmyadmin/examples/create_tables.sql.gz | mysql

(of course this assumes development environment where your default mysql user is root and you use no password; in other case use | mysql -uuser_name -p)

(当然,这假设开发环境中您的默认 mysql 用户是 root 并且您不使用密码;在其他情况下使用| mysql -uuser_name -p

回答by user2421410

I shear the point made by user2237829. The table names in the create_tables script used a double underscore while the table names in the xampp example uses a single underscore.

我剪切了 user2237829 提出的观点。create_tables 脚本中的表名使用双下划线,而 xampp 示例中的表名使用单下划线。

回答by spashtech

This one just worked for me....

这个只对我有用....

The error message displayed is:

显示的错误消息是:

“# 1146 – Table ‘phpmyadmin.pma_table_uiprefs' doesn't exist“

on your programme files,locate the configuration file config.inc.phpphpmyadmin

在您的程序文件上,找到配置文件config.inc.phpphpmyadmin

Then trace the file $Cfg ['Servers'] [$ i] ['table_uiprefs'] = ‘pma_table_uiprefs';

然后跟踪文件 $Cfg ['Servers'] [$ i] ['table_uiprefs'] = ‘pma_table_uiprefs';

and replace it to the code : $cfg ['Servers'] [$ i] ['pma__table_uiprefs'] = ‘pma__table_uiprefs';

并将其替换为代码: $cfg ['Servers'] [$ i] ['pma__table_uiprefs'] = ‘pma__table_uiprefs';

restart your XAMMP and start localhost

重启你的 XAMMP 并启动 localhost

solved.

解决了。

回答by Marco Sulla

This is a known bugon Linux Debian. I solved using the create_tables.sql in the official packageand changing pma_ with pma__ inside /etc/phpmyadmin/config.inc.php

这是Linux Debian 上的一个已知错误。我解决了使用官方包中的create_tables.sql并在/etc/phpmyadmin/config.inc.php中使用pma__更改pma_