LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2010, 06:05 AM   #1
siva balan
LQ Newbie
 
Registered: Jul 2010
Posts: 25

Rep: Reputation: 0
restoring the dumped database in mysql


in my fedora machine i gave
mysqldump <database-name> > bakup.sql
in my solaris machine i gave
mysql <newly created dbname> < bakup.sql
it shows the below error
ERROR 1064 at line 25: 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 7

mysql version in my fedora machine is
mysql Ver 14.14 Distrib 5.1.47
mysql version in my solaris machine is
mysql Ver 12.22 Distrib 4.0.24

please guide me
 
Old 10-14-2010, 06:18 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Hello

You are using lower version of mysql on solaris machine. Just install download and install equal version or greater version of mysql server on solaris and then restore mysql.

Regards,
 
Old 10-14-2010, 04:50 PM   #3
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
Quote:
Originally Posted by siva balan View Post
in my fedora machine i gave
mysqldump <database-name> > bakup.sql
in my solaris machine i gave
mysql <newly created dbname> < bakup.sql
it shows the below error
ERROR 1064 at line 25: 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 7

mysql version in my fedora machine is
mysql Ver 14.14 Distrib 5.1.47
mysql version in my solaris machine is
mysql Ver 12.22 Distrib 4.0.24

please guide me
First create a blank MySQL Database, as well as a MySQL user account that has permissions to write the the database.


mysql -uuser_name -ppassword database_name < bakup.sql

Note: most mysql clients do not seme to like "-u user_name -p password" so omit the space, "-uuser_name -ppassword"
 
Old 10-15-2010, 03:06 AM   #4
fiku
LQ Newbie
 
Registered: Oct 2010
Posts: 25

Rep: Reputation: 2
Maybe try out just copying the DB dir? This can also work, done this before.
 
Old 10-15-2010, 04:59 AM   #5
siva balan
LQ Newbie
 
Registered: Jul 2010
Posts: 25

Original Poster
Rep: Reputation: 0
Using the "--compatible=mysql40" option for mysqldump. http://www.tonyspencer.com/2005/10/2...lder-versions/ ...its working fine now..

Last edited by siva balan; 10-15-2010 at 05:00 AM.
 
  


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
restoring a database (mysql) alejandroye Linux - Server 1 05-18-2010 08:50 PM
MySQL fails to start after loading dumped InnoDB database timhilliard Linux - Newbie 3 03-25-2009 08:41 AM
Restoring mysql database h725 Linux - Server 1 03-25-2009 05:24 AM
Restoring a running mysql database mazzo Linux - Server 4 04-27-2007 12:25 PM
restoring mysql database MrSako Linux - Software 2 12-09-2006 03:42 PM


All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration