qq_遁去的一_1
一般提示1064 - You have an error in your SQL syntax;,都是语法的问题可以通过下面这个方法查看mysql的语法,你的问题在于COLLATE 后没加上参数mysql> ? create table| CHAR[(length)][CHARACTER SET charset_name] [COLLATE collation_name]| VARCHAR(length)[CHARACTER SET charset_name] [COLLATE collation_name]你可以试下CREATE TABLE `user` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT,`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,`gender` enum('female','male') NOT NULL,`birthday` date DEFAULT NULL,`password` varchar(255) CHARACTER SET utf8 NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin11 row in set (0.00 sec)