SQL #1146 - 表 'phpmyadmin.pma__tracking' 不存在

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24055394/
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-09-01 02:00:25  来源:igfitidea点击:

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

sqlphpmyadmin

提问by user3603183

Having a problem opening any of my databases in phpMyadmin I tried deleting a lot of old, irrelevant databases and may have in the process deleted something I shouldn't have and was wondering what I could do to resolve the error

在 phpMyadmin 中打开我的任何数据库时出现问题我尝试删除许多旧的、不相关的数据库,并且可能在此过程中删除了一些我不应该删除的内容,并且想知道我可以做些什么来解决错误

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

#1146 - 表 'phpmyadmin.pma__tracking' 不存在

回答by Oldskool

All the phpMyAdmin tables are defined in the SQL dump that comes with the package in sql/create_tables.sql. You can import that file in it's entirety (will also re-create any other tables you might have dropped) or just create the missing table by running this query:

所有 phpMyAdmin 表都在sql/create_tables.sql包附带的 SQL 转储中定义。您可以完整地导入该文件(还将重新创建您可能已删除的任何其他表)或通过运行以下查询来创建丢失的表:

CREATE TABLE IF NOT EXISTS `pma__tracking` (
  `db_name` varchar(64) NOT NULL,
  `table_name` varchar(64) NOT NULL,
  `version` int(10) unsigned NOT NULL,
  `date_created` datetime NOT NULL,
  `date_updated` datetime NOT NULL,
  `schema_snapshot` text NOT NULL,
  `schema_sql` text,
  `data_sql` longtext,
  `tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') default NULL,
  `tracking_active` int(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`db_name`,`table_name`,`version`)
)
  COMMENT='Database changes tracking for phpMyAdmin'
  DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

Switch to the phpmyadmin database. You can then use the "SQL" tab to execute this query directly on the database.

切换到 phpmyadmin 数据库。然后,您可以使用“SQL”选项卡直接在数据库上执行此查询。

回答by Venash

I had this problem after installed XAMPP. I did the following:

安装 XAMPP 后我遇到了这个问题。我做了以下事情:

  1. In /opt/lampp/bin1use ./mysql_upgrade -u rootwith option -pif you use a password.
  2. In /opt/lampp/var/mysql/phpmyadminrmall *.ibdfiles.
  3. Import create_tables.sqlin phpMyAdmin GUI or run it in console.
  1. /opt/lampp/bin1使用./mysql_upgrade -u root与选项-p,如果你使用密码。
  2. /opt/lampp/var/mysql/phpmyadminrm所有*.ibd文件中。
  3. 在 phpMyAdmin GUI 中导入create_tables.sql或在控制台中运行它。

回答by coviex

Had similar problem.

有类似的问题。

I created pma__tables in my project db by clicking something in operations tab of that db.

我通过单击该数据库的操作选项卡中的某些内容在我的项目数据库中创建了pma__表。

Then I deleted my db, created new with the same name and got "table does not exist" problem.

然后我删除了我的数据库,创建了同名的新数据库,并出现了“表不存在”的问题。

Fixed it by executing modified sql/create_table.sqlon my db. Had to delete phpmyadmindb creation and use from there.

通过在我的数据库上执行修改后的sql/create_table.sql来修复它。不得不删除phpmyadmindb 创建并从那里使用。

回答by Gideon Maina

I had this issue when I switched from mysqlto maraidb. The solution was to do the following, run the create tables script from the console.

当我从 切换mysql到时遇到了这个问题maraidb。解决方案是执行以下操作,从控制台运行创建表脚本。

Get to the terminal

到达终端

   $ mysql -uroot -padmin

Then import the create phpmyadmindb and tables script, I got it from Oldskool's answer above. (READ it before running it)

然后导入 create phpmyadmindb 和 tables 脚本,我从上面的 Oldskool 的回答中得到了它。(在运行之前阅读它)

 MariaDB [(none)]> source create_tables_phpmyadmin.sql;
 Query OK, 1 row affected (0.00 sec)

 Database changed
 Query OK, 0 rows affected (0.02 sec)
 ...

In case of existserror you may clear your previous phpmyadmindb that you had tried adding.

如果出现exists错误,您可以清除之前phpmyadmin尝试添加的数据库。