LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-05-2007, 11:54 AM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Rep: Reputation: 31
Question 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 6which 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)

Last edited by cucolin@; 06-05-2007 at 12:55 PM.
 
Old 06-07-2007, 09:00 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
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.
 
Old 06-11-2007, 10:51 AM   #3
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
It worked!
 
Old 06-11-2007, 11:49 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
It worked!
Good to hear that, but what worked?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC compiler giving syntax error before 'double' error dragonmint Programming 2 06-02-2007 02:07 PM
C++ syntax error before :: token HELP, i cant find the syntax error :( qwijibow Programming 2 12-14-2004 06:09 PM
error 1064 mysql Tredo Linux - Security 4 12-02-2004 05:24 PM
MySQL error 1064 tangle Linux - General 2 11-16-2004 01:17 AM
ERROR running make when installing Nvidia drivers (syntax error) randyriver10 Linux - Software 5 02-21-2004 04:51 PM


All times are GMT -5. The time now is 12:17 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration