Support » Installing WordPress » major #1064 error on re-upload of sql database

  • Hello.

    I was trying to move my WordPress installation from a sub-directory to a root directory.

    Saved my database via php-myadmin then re-uploaded same database only ten minutes later and received the following error:

    #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 ‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
    “http://www.’ at line 1

    Needless to say site’s down and can’t access admin panel.

    Any help would be very much appreciated.

    NIk

Viewing 4 replies - 1 through 4 (of 4 total)
  • did you delete the existing database before uploading the backup? FYI you can leave the database where it is when moving your installation to the root. the only thing you would need to change is the home and site url in the database or the config to reflect the shift, see this

    one thing though, it looks like html not sql, what does the first 20 or so lines look like in your sql file?

    Hi maoski.

    Thanks very much for the reply.

    I did ‘drop’ all the tables before uploading the backup.

    I realise in retrospect that I could have left the database alone (20/20 retrospective vision) but a big part of what I was trying to accomplish was a search and replace on many many absolute urls so I downloaded the database, kept the original, did a search and replace for the new url, tried to upload the ‘new’ ‘replaced’ version which failed as above, then tried to upload the original, which also failed as above.

    And yes, I saw the html, and just found the ‘offending’ html in the sql file, buried down at line 13280:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Do I delete it?

    How did it get in there?

    Could it be my host?

    Thanks

    NIk

    Here is the aforementioned code:

    http://pastebin.com/index/C8EyDR3a

    I resolved the problem via the host.
    Something was being corrupted in the process of exporting the database via php myadmin. Tables had disappeared, etc.

    Host found version of the site from two days ago and remounted it.

    Nik

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘major #1064 error on re-upload of sql database’ is closed to new replies.