MyBB Community Forums

Full Version: Database Restore Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a test copy of my forum http://rantcentral.hostoi.com on localhost. I'm using WampServer to test various plugins, upgrades or themes before the go on my live site.

I recently thought about the possibility of losing the data on my small forum (over 12,000 posts and other data). I figured it would be good to learn how to restore my forum from the database backups I have been keeping.

When I try to import these backups into my localhost database, I receive an error. These are the steps I took and the error message I received:

  1. Renamed old database from mybb to mybb1 (I have a test database with dummy posts on the localhost site)
  2. Created new database named mybb
  3. Imported the structure-only backup I made of my forum
  4. Import the data-only backup I made of my forum-
    received this error message:

    #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 [Image: s_error.png]

I am restoring the database in two passes (structure then data) because I was getting errors for the database to be restored being too big (8MB is my limit) so I broke them up to avoid that limitation.

Any help would be appreciated because I fear that should something happen to my forum I would not be able to restore it.

Thanks in advance.
My advice would be to download a complete back up instead of two separate ones, then use a tool such as bigdump to import the database backup in parts.
(2012-04-07, 06:40 PM)Wildcard Wrote: [ -> ]I am restoring the database in two passes (structure then data) because I was getting errors for the database to be restored being too big (8MB is my limit) so I broke them up to avoid that limitation.

Doing that is going to do nothing to get around the size problem as the backup file for the structure will be tiny, all that will be doing is creating the tables, which would take up a such a tiny proportion of the full backup file size that it wouldn't make any difference.

If size is an issue though, you can change the file upload size limit to whatever you want if you're doing it on a localhost. Or, yes, something like bigdump is also a good option.
Lets forget about the size limitation for now, guys. I have that part handled. My question is concerning the error message:

Quote:#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

What does it mean and why am I getting it?

Thanks in advance.
Could you post the whole error? It usually tells you what the query was too.
It turned out that the problems I was experiencing went away with an update for WampServer . . . apparently it was a bug.

Thanks for all the help Smile