PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > CMS教程 > ecshop教程 > 正文

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

    作者:admin来源:网络浏览:时间:2020-09-30 00:07:50我要评论
    导读:ECSHOP网店程序在搬迁空间或恢复备份或更换域名后 ,经常会出现以下错误提示:MySQL server error report:Array ( [0] => Array (...
    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;


    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-104-1412-1.html
    相关热词搜索: