我犯了一个最奇怪的错误。
有时,在创建或更改表时,会出现“表已经存在”错误。但是,DROPTABLE 返回“ # 1051-未知表”。所以我得到了一个表,我不能创建,不能删除。
当我尝试删除数据库时,mysqld 崩溃了。有时创建另一个具有不同名称的 db 会有所帮助,有时则不会。
我使用一个有大约50个表的数据库,全部是 InnoDB。这个问题发生在不同的表上。
我在 Windows,Fedora 和 Ubuntu,MySQL 5.1和5.5上都经历过这种情况。在使用 PDO、 PHPMyAdmin 或命令行时,行为相同。我使用 MySQL Workbench 来管理我的模式——我看到了一些相关的错误(端线和其他东西) ,但是没有一个与我相关。
No, it is not a view, it is a table. All names are lowercase.
我试了所有能用谷歌搜索的方法,冲洗桌子,搬家。从 db 文件到 db 文件,阅读 mysql 日志,没有什么帮助,但重新安装整个该死的东西。
‘显示表’什么都没有显示,‘描述表’说‘表不存在’,就没有。然而,“ create table”仍然以错误结束(“ create table if not been”也是如此) ,并且删除数据库会导致 mysql 崩溃
相关但无益的问题:
编辑:
mysql> use askyou;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> create table users_has_friends (id int primary key);
ERROR 1050 (42S01): Table '`askyou`.`users_has_friends`' already exists
mysql> drop table users_has_friends;
ERROR 1051 (42S02): Unknown table 'users_has_friends'
因此,都一样: 表不存在,却不能被创建;
mysql> drop database askyou;
ERROR 2013 (HY000): Lost connection to MySQL server during query
Names change, this is not the only table / database I've run into problems with