Jump to content

Help to solve 1064 error please


zillabuggs

Recommended Posts

I'm very new to this and getting the following error when trying to import database.  Below is the content of the message.  Any help would be appreciated.

 

MySQL said:

#1064 - 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 '' at line 1

 

 

SQL query:

 

-- MySQL dump 10.13 Distrib 5.1.49, for debian-linux-gnu (i486)

--

-- Host: justcatchatcom.fatcowmysql.com Database: wrd_heo6cg7l32

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

-- Server version 5.1.53-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;

 

 

 

 

Link to comment
Share on other sites

The  characters are the utf-8 Byte Order Mark (BOM) characters. I'm guessing you have opened the file in your editor and it got saved with the BOM. You need to save the file without the BOM characters. Your editor should have a choice under the 'save as' menu or under a character encoding menu to save the file without the BOM.

Link to comment
Share on other sites

That sounds like MS Notepad. If your file only contains ASCII characters, you can use the ANSI selection. If you have UTF-8 encoded data, don't use the ANSI selection.

 

You should not try to use MS Notepad as a programming editor. I recommend using Notepad++. It will allow you to save your file without the BOM characters.

Link to comment
Share on other sites

Hi again.  I downloaded notepad++ and tried saving and importing the database again.  Still getting the same error.  Can I ask a stupid question though.  To return this error, should these characters actually appear in the database somewhere, as I cannot see them anywhere?

Link to comment
Share on other sites

The characters are part of the file and are at the very beginning of the saved file. They are put there by editors when they detect a file contains UTF-8 encoded characters.

 

Using notepad++, there is an 'Encoding' menu in the top menu bar. When you open your file, it should show the 'Encode in UTF-8' item selected. Pick the setting right above that one, 'Encode in UTF-8 without BOM', and save the file.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.