Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi 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`)

-- 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?

share|improve this question
Is your problem solved? @user72410 – Stony Mar 4 '11 at 23:32

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.