LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-12-2010, 03:15 AM   #1
sci3ntist
Member
 
Registered: Dec 2006
Distribution: Debian,Slackware,FreeBSD,CentOS,Red Hat,Windows Server 2008
Posts: 133

Rep: Reputation: 16
Rsync and mysql


Hello,
Im trying to migrate mysql to a new server, the first server is FreeBSD 6.2 and the second server is ubuntu, so I used rsync for that, on ubuntu:
show database; works successfully and shows the database imported from the FreeBSD box, show tables; also works, but select data from any didn't work, I keep getting "ERROR 1146 (42S02): Table 'DATABASE.TABLENAME' doesn't exist", although .frm .MYI .MYD are available in /var/lib/mysql/databasename

Thanks in advance.
 
Old 01-12-2010, 04:55 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by sci3ntist View Post
Hello,
Im trying to migrate mysql to a new server, the first server is FreeBSD 6.2 and the second server is ubuntu, so I used rsync for that, on ubuntu:
show database; works successfully and shows the database imported from the FreeBSD box, show tables; also works, but select data from any didn't work, I keep getting "ERROR 1146 (42S02): Table 'DATABASE.TABLENAME' doesn't exist", although .frm .MYI .MYD are available in /var/lib/mysql/databasename

Thanks in advance.
are both source and destination databases the same versions? can you confirm this?
i think mysqldump is best for this.
why?? because it actually creates the database/tables on the new location in the proper format and structure that was used originally and will also drop the databases/tables if they already exist in the new location first..

Code:
mysqldump -uuser -ppassword database (table) | mysql -h host -uuser -ppassword database (table)

Last edited by centosboy; 01-12-2010 at 05:04 AM.
 
Old 01-12-2010, 06:43 AM   #3
sci3ntist
Member
 
Registered: Dec 2006
Distribution: Debian,Slackware,FreeBSD,CentOS,Red Hat,Windows Server 2008
Posts: 133

Original Poster
Rep: Reputation: 16
Thanks for the reply, but doing it over rsync would be easier for me, Ill figure out writing a script for that.
 
  


Reply



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
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
Rsync not backing up MySQL cabron Linux - Server 3 12-26-2007 07:56 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:20 AM.

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
Open Source Consulting | Domain Registration