安装网站的时候数据库错误,是本地电脑,刚刚安装了个wampserver,数据库出现如下提示,是我的设置错误吗?
MySQLQuery:CREATETABLE`aaa_admin`(`userid`mediumint(8)unsignedNOTNULL,`username`char(...
MySQL Query : CREATE TABLE `aaa_admin` ( `userid` mediumint(8) unsigned NOT NULL, `username` char(20) NOT NULL, `allowmultilogin` tinyint(1) unsigned NOT NULL default '0', `alloweditpassword` tinyint(1) unsigned NOT NULL default '0', `editpasswordnextlogin` tinyint(1) unsigned NOT NULL default '0', `disabled` tinyint(1) unsigned NOT NULL default '0', PRIMARY KEY (`userid`)) TYPE=MyISAM DEFAULT CHARSET=gbk
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM DEFAULT CHARSET=gbk' at line 1
MySQL Errno : 1064
Message : MySQL Query Error 展开
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM DEFAULT CHARSET=gbk' at line 1
MySQL Errno : 1064
Message : MySQL Query Error 展开
2个回答
展开全部
不是说你数据库有问题,"You have an error in your SQL syntax"是说不能执行这个sql query,存在语法错误,可能是你用的版本不支持这个语法
试一下面的
CREATE TABLE `aaa_admin` (
`userid` mediumint(8) unsigned NOT NULL,
`username` char(20) NOT NULL,
`allowmultilogin` tinyint(1) unsigned NOT NULL default '0',
`alloweditpassword` tinyint(1) unsigned NOT NULL default '0',
`editpasswordnextlogin` tinyint(1) unsigned NOT NULL default '0',
`disabled` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk
试一下面的
CREATE TABLE `aaa_admin` (
`userid` mediumint(8) unsigned NOT NULL,
`username` char(20) NOT NULL,
`allowmultilogin` tinyint(1) unsigned NOT NULL default '0',
`alloweditpassword` tinyint(1) unsigned NOT NULL default '0',
`editpasswordnextlogin` tinyint(1) unsigned NOT NULL default '0',
`disabled` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询