Error Code : 1064 You have an error in your SQL syntax
I'm trying to import a database to our new server:
eg. myShell:~ > mysql -h dbxx.perfora.net -u dboxxxxxxxx -p dbxxxxxxxx < dump_file.sql I'm getting this error: Error 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 'DEFAULT CHARSET=latin1' at line 6 I check line 6:(which is empty) 1 -- MySQL dump 10.10 2 -- 3 -- Host: conference.behaviordesign.com Database: bhvrconference 4 -- ------------------------------------------------------ 5 -- Server version 5.0.24a-standard-log 6 7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; I was searching that this might be a different mysql version problem, so I check each server with the status command and got: Destination mysql Ver 14.12 Distrib 5.0.16, for pc-linux-gnu (i686) using readline 5.0 Connection id: 1481146 Current database: Current user: someuser SSL: Not in use Current pager: less Using outfile: '' Using delimiter: ; Server version: 4.0.27-standard-log Protocol version: 10 Connection: db965.perfora.net via TCP/IP Client characterset: latin1 Server characterset: latin1 TCP port: 3306 Uptime: 2 days 7 hours 19 min 49 sec Threads: 4 Questions: 75993892 Slow queries: 106 Opens: 4202288 Flush tables: 1 Open tables: 64 Queries per second avg: 381.517 Source(where dumps where made) mysql Ver 14.12 Distrib 5.0.16, for pc-linux-gnu (i386) using readline 5.0 Connection id: 2495166 Current database: Current user: someuser SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.0.24a-standard-log Protocol version: 10 Connection: conference.behaviordesign.com via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 TCP port: 3306 Uptime: 22 days 12 hours 45 min 15 sec Threads: 5 Questions: 75683366 Slow queries: 14404996 Opens: 1983067 Flush t ables: 24 Open tables: 350 Queries per second avg: 38.877 I confirmed that it is in fact two diff. versions. How can I make this imports happen? Simplest solution. Thanks (Excuse me for the confusion, [source & Destination] Dumps were made in the Server version:5.0.24a-standard-log) |
The server version for the source (5.0.24a-standard-log) looks to be newer than the destination (4.0.27-standard-log), so I don't think this is going to work.
Backwards-compatability is possible, and handy, but I do not think forwards-compatability exists! So the simplest solution might be to upgrade the server version on the destination. |
It worked!
|
Quote:
|
All times are GMT -5. The time now is 10:07 AM. |