#1064 - You have an error in your SQL syntax;

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tilenk
    New Member
    • Jul 2008
    • 1

    #1064 - You have an error in your SQL syntax;

    Hello. I'm having a problem with restoring a mysql database for wordpress when moved to a new host. When I try to execute the following command
    [code=mysql]
    DELIMITER ;;
    DELIMITER ;
    /*!40103 SET TIME_ZONE=@OLD_ TIME_ZONE */;

    /*!40101 SET SQL_MODE=@OLD_S QL_MODE */;
    /*!40014 SET FOREIGN_KEY_CHE CKS=@OLD_FOREIG N_KEY_CHECKS */;
    /*!40014 SET UNIQUE_CHECKS=@ OLD_UNIQUE_CHEC KS */;
    /*!40101 SET CHARACTER_SET_C LIENT=@OLD_CHAR ACTER_SET_CLIEN T */;
    /*!40101 SET CHARACTER_SET_R ESULTS=@OLD_CHA RACTER_SET_RESU LTS */;
    /*!40101 SET COLLATION_CONNE CTION=@OLD_COLL ATION_CONNECTIO N */;
    /*!40111 SET SQL_NOTES=@OLD_ SQL_NOTES */;
    [/code]



    i get the following error message
    Code:
    #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 'DELIMITER' at line 1
    I would really apreciate if someone would help me, as I'm not an expert in mysql...

    Thank you


    Tilen
    Last edited by Atli; Jul 24 '08, 12:35 AM. Reason: Added [code] tags
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi Tilen. Welcome to Bytes!

    That code doesn't really make sense. For one, I'm not sure you can use ;; as a custom delimiter. I wouldn't recommend it even it if was possible.
    Also, even if it does work, the line after that just resets it, nullifying the first command.
    And all the other lines are commented, so only the first two are actually being executed.

    What is it that you are trying to do with this code?
    How are you executing it?
    (Through the CLI? or via a web interface like phpMyAdmin?)

    Comment

    • coolsti
      Contributor
      • Mar 2008
      • 310

      #3
      Atli,

      this looks a lot like the code that is auto generated when making a mysqldump.

      I have also experienced some problems when migrating a database from one Linux machine to another, if the mysql versions did not match. Although the statements look like they are commented out, I got errors until I just went into my mysqldump file and deleted the lines.

      Perhaps the OP is having a similar difficulty.

      Comment

      Working...