首页 > CMS > Ecshop > 正文

ecshop搬家的时候提示Table 'test.ecs_sessions' doesn't exist

2024-07-09 22:56:54
字体:
来源:转载
供稿:网友

ECSHOP网店程序在搬迁空间或恢复备份或更换域名后 ,经常会出现以下错误提示:


MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => Insert INTO `test`.`ecs_sessions` (sesskey, expiry, ip, data) VALUES (’8a3107988bf98cc9a5079fdfbe766120′, ’1278128679′, ’127.0.0.1′, ‘a:0:{}’) ) [2] => Array ( [error] => Table ‘test.ecs_sessions’ doesn’t exist ) [3] => Array ( [errno] => 1146 ) ) ,


这是因为你当初通过ECSHOP后台备份时,少了两个表,


一个是 ecs_sessions ,一个是 ecs_sessions_data。

 

分别将下面两段SQL语句复制粘贴到“ECSHOP后台 》数据库管理 》SQL查询”的输入框里提交即可。

 

CREATE TABLE IF NOT EXISTS `ecs_sessions` (
`sesskey` char(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`expiry` int(10) unsigned NOT NULL DEFAULT '0',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`adminid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ip` char(15) NOT NULL DEFAULT '',
`user_name` varchar(60) NOT NULL,
`user_rank` tinyint(3) NOT NULL,
`discount` decimal(3,2) NOT NULL,
`email` varchar(60) NOT NULL,
`data` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`sesskey`),
KEY `expiry` (`expiry`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

 

------------------------------------------------------------------------------------------------

 

CREATE TABLE IF NOT EXISTS `ecs_sessions_data` (
`sesskey` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
`expiry` int(10) unsigned NOT NULL DEFAULT '0',
`data` longtext NOT NULL,
PRIMARY KEY (`sesskey`),
KEY `expiry` (`expiry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表