日期:2014-05-16 浏览次数:20843 次
-- ---------------------------- -- 创建数据库 -- ---------------------------- CREATE DATABASE ss_log default charset=utf8; SET FOREIGN_KEY_CHECKS=0; USE ss_log; -- ---------------------------- -- 游戏服务器信息 -- ---------------------------- DROP TABLE IF EXISTS `server`; CREATE TABLE `server` ( `key` varchar(50) NOT NULL COMMENT '列', `value` varchar(100) NOT NULL DEFAULT '' COMMENT '值', PRIMARY KEY (`key`), KEY `value` (`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='游戏服务器信息 20120308';
-- ---------------------------- SET NAMES utf8; -- 创建数据库 -- ---------------------------- CREATE DATABASE ss_log default charset=utf8; SET FOREIGN_KEY_CHECKS=0; USE ss_log; -- ---------------------------- -- 游戏服务器信息 -- ---------------------------- DROP TABLE IF EXISTS `server`; CREATE TABLE `server` ( `key` varchar(50) NOT NULL COMMENT '列', `value` varchar(100) NOT NULL DEFAULT '' COMMENT '值', PRIMARY KEY (`key`), KEY `value` (`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='游戏服务器信息 20120308';
------解决方案--------------------
你是在什么中执行的?
mysql> CREATE TABLE `server` ( -> `key` varchar(50) NOT NULL COMMENT '列', -> `value` varchar(100) NOT NULL DEFAULT '' COMMENT '值', -> PRIMARY KEY (`key`), -> KEY `value` (`value`) -> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='游戏服务器信息 20120308'; Query OK, 0 rows affected (0.12 sec) mysql> show create table server; +--------+---------------------------------- -------------------------------------------- -------------------------------------------- --------------+ | Table | Create Table | +--------+---------------------------------- -------------------------------------------- -------------------------------------------- --------------+ | server | CREATE TABLE `server` ( `key` varchar(50) NOT NULL COMMENT '列', `value` varchar(100) NOT NULL DEFAULT '' COMMENT '值', PRIMARY KEY (`key`), KEY `value` (`value`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='游戏服务器信息 20120308' | +--------+---------------------------------- -------------------------------------------- -------------------------------------------- --------------+ 1 row in set (0.00 sec) mysql>