Results 1 to 4 of 4
  1. #1
    Join Date
    May 2012
    Posts
    2

    Unanswered: MySQL dump error when restoring database

    Hi

    I am getting an ERROR 1064 (42000) when I try to restore a database from a mysql dump. I am using the command as follows:
    C:\OLAT\Olat_manual\ACP_HTVMS>mysql -u temp -p temp < ACP_HTVMS.dmp I get the error
    ERROR 1064 (42000) at line 1: 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.
    I was told that the database works fine and the dump file is indeed a mysql dump.

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Check the syntax of -p parameter in mysql. There cannot be a space between -p and the password. Also I am not sure whether you have selected in your dump file a database inot which you are restoring. It might be good to also include a -D dbname to your mysql command line:

    C:\OLAT\Olat_manual\ACP_HTVMS>mysql -u temp -ptemp -D dbname < ACP_HTVMS.dmp

    If this still gives problems then you will need to show us the first few lines of your backup file to see what it is attempting to do.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    check the manual that corresponds to your MySQL server version for the right syntax to use near '♥
    would suggest to me a code page issue
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    May 2012
    Posts
    2
    It was still giving problems. But I needed only table names and attributes so opened the dump file in editor and wrote a program to extract all the create table statements and ran the new script with these statements. Thanks for all the help. Should be helpful in future.

Posting Permissions

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