I generate backups of my databases by using mysqldump.exe -u root --all-databases > mariaDbBackup.sql
.
When I try to restore my dump by doing mysql -u root -p < mariaDbBackup.sql
, I get an
Error 1064 (42000)
near'STATS_PERSISTENT=0'
Here is the faulty line:
CREATE TABLE `engine_cost` (
`engine_name` varchar(64) NOT NULL,
`device_type` int(11) NOT NULL,
`cost_name` varchar(64) NOT NULL,
`cost_value` float DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`comment` varchar(1024) DEFAULT NULL,
PRIMARY KEY (`cost_name`,`engine_name`,`device_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0;
/*!40101 SET character_set_client = @saved_cs_client */;
It is the first line out of seven on the backup that includes STATS_PERSISTENT=0
so I assume it might have to be a compatibility issue. I am using specifically MariaDB 10.1.37 and MySQL 5.5.39.
I assume there have to be some flag in either generating or reading the dump that I can use to be able to do it.
So, how can I restore the dump or how do I generate a compatible dump?
SELECT .. INTO OUTFILE
- separately for each table.