表' XXX.pma__tracking'不存在

时间:2015-03-26 15:43:13

标签: mysql phpmyadmin

我现在非常困惑,但是某些地方phpMyAdmin已经感到困惑。

 SELECT tracking_active FROM `hutber`.`pma__tracking` WHERE db_name = 'hutber'  AND table_name = 'exp_accessories'  ORDER BY version DESC


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

我无法选择db hutber,当我点击任何表格时出现上述错误。

[编辑]

然后我将pma__tracking添加到表中,现在我收到此错误:

  SELECT tracking_active FROM `hutber`.`pma__tracking` WHERE db_name = 'hutber'  AND table_name = 'exp_accessories'  ORDER BY version DESC

  #1054 - Unknown column 'db_name' in 'where clause'

如何修复我的数据库?

mysql> SHOW TABLES; DESC pma__tracking;
+-------------------------------+
| Tables_in_hutber              |
+-------------------------------+
| exp_accessories               |
| exp_actions                   |
| exp_ajw_datagrab              |
| exp_assets_files              |
| pma__tracking                 |
+-------------------------------+
147 rows in set (0.00 sec)

+------------------+-------------+------+-----+---------+-------+
| Field            | Type        | Null | Key | Default | Extra |
+------------------+-------------+------+-----+---------+-------+
| idpma__tracking  | int(11)     | NO   | PRI | NULL    |       |
| tracking_active  | varchar(45) | YES  |     | NULL    |       |
| pma__trackingcol | varchar(45) | YES  |     | NULL    |       |
+------------------+-------------+------+-----+---------+-------+
3 rows in set (0.01 sec)

注意:我创建了pma__tracking ...就这样你就知道为什么结构就是这样。

1 个答案:

答案 0 :(得分:0)

1。 #1146 - Table 'hutber.pma__tracking' doesn't exist


由于它列在SHOW TABLES;中,这可能是/ var / lib / mysql中的mysql权限问题(chmod,chown)。确保pma_tracking具有正确的权限

chown mysql:mysql /path/to/mysql
sudo chmod -R 755 /var/lib/mysql/

2。 #1054 - Unknown column 'db_name' in 'where clause'


DESC pma__tracking;清楚地表明没有列'db_name''version''table_name'如上所述选择查询