Sam's Tech Blog

'You can check out any time you like, But you can never leave!'

2019-09-27

mysqldump problems with restore

mysqldump, mysql, restore, problem, error, import, discard, table

mysqldump problems with restore

error: 'Please DISCARD the tablespace before IMPORT'

I found the easiest way to skip many InnoDB problems was to manually edit phpmyadmin database dump and edit/change the table that had problems to something else than INNODB. I changed the problem table to ENGINE=MyISAM and voila. Import worked.

CREATE TABLE IF NOT EXISTS `home3_acymailing_tag` (
    `tagid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(250) NOT NULL,
    `userid` int(10) unsigned DEFAULT NULL,
    PRIMARY KEY (`tagid`),
    KEY `useridindex` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;