#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Help! Dump vers 3 - import to vers 5


    I'm trying to dump a database on one server and import it to a different server. The source server is running mysql version 3.23.58. The target server is running mysql version 5.1.52.

    I'm using this command to dump on the source server:
    mysqldump --user=root --password dbname > /tmp/outfile.sql

    I then sftp that file to the target server and attempt to import the file using this command:
    mysql --user=root --password dbname < /tmp/outfile.sql

    ...but I receive this error:
    ERROR 1064 (42000) at line 4: 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 '-------------------------------------------------------

    I suspect that the issue has to do with the version mismatch. Any suggestions? This is a client's database and I have a quickly-approaching deadline to move off of the old server
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,124
    Rep Power
    4274
    Originally Posted by kmac99
    '-------------------------------------------------------
    edit your sql file and remove those lines
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo