我正在添加这个表:
CREATE TABLE contenttype (
contenttypeid INT UNSIGNED NOT NULL AUTO_INCREMENT,
class VARBINARY(50) NOT NULL,
packageid INT UNSIGNED NOT NULL,
canplace ENUM('0','1') NOT NULL DEFAULT '0',
cansearch ENUM('0','1') NOT NULL DEFAULT '0',
cantag ENUM('0','1') DEFAULT '0',
canattach ENUM('0','1') DEFAULT '0',
isaggregator ENUM('0', '1') NOT NULL DEFAULT '0',
PRIMARY KEY (contenttypeid),
UNIQUE KEY packageclass (packageid, class)
);
我得到了一个1050“表已经存在”
但是这个表并不存在。有什么想法吗?
编辑:更多细节,因为似乎每个人都不相信我:)
DESCRIBE contenttype
收益率:
1146 -表'gunzfact_vbforumdb.contenttype‘不存在
和
CREATE TABLE gunzfact_vbforumdb.contenttype(
contenttypeid INT UNSIGNED NOT NULL AUTO_INCREMENT ,
class VARBINARY( 50 ) NOT NULL ,
packageid INT UNSIGNED NOT NULL ,
canplace ENUM( '0', '1' ) NOT NULL DEFAULT '0',
cansearch ENUM( '0', '1' ) NOT NULL DEFAULT '0',
cantag ENUM( '0', '1' ) DEFAULT '0',
canattach ENUM( '0', '1' ) DEFAULT '0',
isaggregator ENUM( '0', '1' ) NOT NULL DEFAULT '0',
PRIMARY KEY ( contenttypeid ) ,
收益率:
1050 -表“contenttype”已存在
发布于 2010-07-22 03:07:32
发布于 2012-08-23 15:31:53
从MySQL日志:
InnoDB: You can drop the orphaned table inside InnoDB by
InnoDB: creating an InnoDB table with the same name in another
InnoDB: database and copying the .frm file to the current database.
InnoDB: Then MySQL thinks the table exists, and DROP TABLE will
InnoDB: succeed.
发布于 2010-11-23 08:00:57
我得到了同样的错误,而修复表(来自@NullUserException的答案)没有帮助。
我最终找到了this solution
sudo mysqladmin flush-tables
对于我来说,在没有sudo
的情况下,我得到了以下错误:
mysqladmin: refresh failed; error: 'Access denied; you need the RELOAD privilege for this operation'
(在OS X 10.6上运行)
https://stackoverflow.com/questions/3302476
复制相似问题