突然之间,我的mysql数据库表出现了一个奇怪的错误。
SELECT * FROM mytable
返回:
ERROR 1932 (42S02): Table 'mydb.mytable' doesn't exist in engine
我可以确认这些表确实存在于本地文件系统中,show tables;
确实返回了我感兴趣的表。
show tables;
+-----------------+
| Tables_in_mydb |
+-----------------+
| presets |
| mytable |
+-----------------+
选择:
select * from mytable;
Table 'mydb.mytable' doesn't exist in engine.
错误绝对没有意义,我几天前一直在使用这些表而没有任何问题。我没有动过桌子。我该怎么办?
在上述错误出现之前我遇到了错误:
Access denied for user 'root'@'localhost' (using password: YES),
但我成功更新了密码。我不知道是什么触发了这个错误,因为我没有玩过密码。但是,当我尝试修复此错误时,我已将/Applications/XAMPP/xamppfiles/var/mysql
的权限设置为read/write
给所有人。
UPDATE:
show table status gives back a really weird outout:
+-----------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+------------------------------------------------------+
| Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment |
+-----------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+-------------------+----------+----------------+------------------------------------------------------+
| preset | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Table 'mydb.preset' doesn't exist in engine |
| mytable | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Table 'mydb.mytable' doesn't exist in engine |
答案 0 :(得分:1)
SHOW TABLES
结果看起来有些偏差。该框在mytable
行上有更多空间。某种程度上,你的表名中是否有可能存在隐形字符?也许你创造错了?