安装phpcms 2008 报错
用的wamp安装phpcms2008报错下面是错误完整提示:MySQLQuery:CREATETABLE`phpcms_admin`(`userid`mediumint(...
用的wamp 安装phpcms2008 报错
下面是错误完整提示:
MySQL Query : CREATE TABLE `phpcms_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 Query : CREATE TABLE `phpcms_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 展开
1个回答
2014-12-08
展开全部
报这个错的原因可能是你的mysql版本可能过高导致的。
因为报错位置在: 'TYPE=MyISAM DEFAULT CHARSET=gbk'这个地方,type和engine都代表数据库引擎,但type只向下兼容,建议使用engine即可解决。
正确sql语句如下:
CREATE TABLE `phpcms_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
或者最简单的办法是装个mysql版本低于5.2的php集成安装包,可以顺利安装phpcms。
因为报错位置在: 'TYPE=MyISAM DEFAULT CHARSET=gbk'这个地方,type和engine都代表数据库引擎,但type只向下兼容,建议使用engine即可解决。
正确sql语句如下:
CREATE TABLE `phpcms_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
或者最简单的办法是装个mysql版本低于5.2的php集成安装包,可以顺利安装phpcms。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询