SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Central Illinois
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error 1065: Query was empty

    I'm trying to move a MySQL database from one server to another. The old server is running MySQL 4.1 and the new one is running 3.23. I got the database dumped and transferred okay, only to get the following error when I tried to restore the database on the new server:

    Error 1065 at Line 7: Query was empty

    I checked Line 7 of the .sql backup file and found that it was just commented out. I would have thought that it would have just skipped over anything that had been commented out like that, but somehow it's choking.

    What can I do to either:

    1.) Get my database backup to not include comments,
    - or -
    2.) Simply ignore the commented lines when I restore?

    Any ideas will be most welcome.

    Thanks,

    Matthew

  2. #2
    SitePoint Zealot newspire's Avatar
    Join Date
    Mar 2005
    Location
    Houston, TX
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access to the file system you could just copy the db files from one server to the other. Just make sure nothing writes to them while you are copying.

  3. #3
    SitePoint Zealot swiftone's Avatar
    Join Date
    Mar 2005
    Location
    Sunny Florida
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most times you will not get the correct line number from MySQL about errors. However, the error usually does occur in the line before, or a couple of lines before the line given.
    You are going backwards in version, but I don't see why it would not work if you did a sqldump.
    Copying the raw files is the best method to move your MySQL database.
    Happy Coding,
    Swiftone

    Unique Web Sites


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •