Announcement

Collapse
No announcement yet.

"You have an error in your SQL syntax...."

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • "You have an error in your SQL syntax...."

    Im attempting to move a forum between servers. I had the hosting provider make the backup for me as they would not allow me shell access to do it. I downloaded the backup, uploaded it to the new server and when I attempt to import it via command line, I get this error:

    ERROR 1064 (42000) at line 391: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

    Im sure the version of MySQL Im importing to is newer than what was on the old server. Ive looked around and cant really find much on how to fix this. Anyone got any clues?

    Thanks

  • #2
    if you move to a new host, hopefully you picked one with ssh2 shell access, if so, import it from the shell.

    Comment


    • #3
      Originally posted by Floris View Post
      if you move to a new host, hopefully you picked one with ssh2 shell access, if so, import it from the shell.
      Thats what Im doing. Thats where the error is being produced.

      Comment


      • #4
        I moved from a Yahoo hosting provider (oh man, never use that for vb...) to a Dedicated server and I had to install phpMyAdmin for the Yahoo server and export the database from there, repeatedly. After about a few exports of trying and finagling I finally got it to work. I'd suggest installing PMA and going that route if at all possible, then restoring in the shell.

        Comment


        • #5
          Plesk has PMA installed however the database is so big, I havent been able to get it to import with PMA.

          Comment


          • #6
            What is the complete error including the SQL statement?
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #7
              ERROR 1064 (42000) at line 391: 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 ''ÿØÿá1«Exif\0\0II*\\0\0\0
              \0\0 \0\0\0\0\0\0\0
              \0\0\0\0\0\0\0\0\0\0' at line 1
              Im not sure how thats going to turn out but thats what console is spitting back at me.

              Comment


              • #8
                It appears to be choking on your attachments. Make sure the character set and encoding of your new database is exactly the same as the one on your Yahoo server.

                This is one of the issues from exporting via phpMyAdmin. You can try creating to backups. One that has everything but attachments. Then another that has the attachments. If you can though, I would recommend setting Attachment Storage to the file system and moving them via FTP. Not sure if Yahoo supports that though.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment


                • #9
                  I dont have a Yahoo server. That was someone else. I dont know how the database was exported. Maybe I should go back and have the guy export it via command line if he uses phpmyadmin.

                  Comment


                  • #10
                    Sorry... The file is a .SQL file correct?
                    Translations provided by Google.

                    Wayne Luke
                    The Rabid Badger - a vBulletin Cloud demonstration site.
                    vBulletin 5 API - Full / Mobile
                    Vote for your favorite feature requests and the bugs you want to see fixed.

                    Comment


                    • #11
                      Yep

                      Comment


                      • #12
                        One possible cause is a MySQL version mismatch between the old and new servers. Can you find out the exact versions?
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment


                        • #13
                          The old version is 4.1.7, the new version is in the 5 family.

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...
                          X