恢复备份数据库出错2.61版本的

2016-07-07 15:51 来源:www.chinab4c.com 作者:ecshop专家

恢复备份数据提示如下错误。MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => CREATE TABLE `fsa_account_log` ( `log_id` mediumint(8) unsigned NOT NULL auto_increment, `user_id` mediumint(8) unsigned NOT NULL, `user_money` decimal(10,2) NOT NULL, `frozen_money` decimal(10,2) NOT NULL, `rank_points` mediumint(9) NOT NULL, `pay_points` mediumint(9) NOT NULL, `change_time` int(10) unsigned NOT NULL, `change_desc` varchar(255) NOT NULL, `change_type` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`log_id`), KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=gbk DEFAULT CHARSET=utf8 ) [2] => Array ( [error] => Conflicting declarations: 'CHARACTER SET gbk' and 'CHARACTER SET utf8' ) [3] => Array ( [errno] => 1302 ) )

回答:
错误:Conflicting declarations: 'CHARACTER SET gbk' and 'CHARACTER SET utf8'
原因:您的数据库中有GBK和UTF-8两种编码的数据
解决方法:统一编码

共享里有转换编码的工具
见此贴:
http://bbs.ecshop.com/viewthread ... 26amp%3Btypeid%3D16

万分感谢