1

I'am going to restore a database backup which has separated files for each table with same table name prefix, and the problem is when I try to import I get this syntax error: EERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--------------------------------------------------------

and structure of all backup files are like this:

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


--
-- Table structure for `kobebryant_adminlog`
--

CREATE TABLE `kobebryant_adminlog` (
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `ipaddress` varchar(50) NOT NULL DEFAULT '',
  `dateline` bigint(30) NOT NULL DEFAULT '0',
  `module` varchar(50) NOT NULL DEFAULT '',
  `action` varchar(50) NOT NULL DEFAULT '',
  `data` text NOT NULL,
  KEY `module` (`module`,`action`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `kobebryant_adminlog`
--

my current mysql server verion is : 5.0.67-community and version of mysql which backups are generated is: 5.1.40

how can i import these files?

1 Answers1

0

Yes delete the first line and try it again.

Reason: the comment sequence is "--" when you make many of them in one line you get an error.

René Höhle
  • 1,418
  • 3
  • 17
  • 26