LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-27-2007, 12:08 PM   #1
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Rep: Reputation: 30
how to dump an sql table only data


hello there, i have been using MySQL to hold our workshop database.
We are upgrading our hardware, so i need to use a mysql dump. No problem.
however, the new table structures need to all be Unicode UTF-8 where some of the existing ones character sets are West European.

so i suppose i want to truncate all of my tables on the new server and dump from the old to import into the new. Is there a way i can do this and only dump the data inserts and not the table structure ? there are 79 tables, kinda a lot to do by hand.

thanks
 
Old 12-27-2007, 01:38 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by nephish View Post
there are 79 tables, kinda a lot to do by hand.
Sounds like a job for sed. Or if you want it a little easier, a bash script using ex and a here document.
 
Old 12-27-2007, 02:55 PM   #3
nephish
Member
 
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456

Original Poster
Rep: Reputation: 30
ok, cool. thanks

i did find another way.
using mysqldump with the -t option only dumps the rows of the table.
It does not output the table structure.

thanks again
 
  


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
SQL statement to get the last row in a table oulevon Programming 11 04-03-2009 09:30 PM
SQL: old sql dump not loading into new db BrianK Linux - Software 1 07-26-2006 12:55 AM
Massive SQL dump without local access. xconspirisist Linux - General 1 01-30-2005 11:07 AM
Dump filesystem table fransemail Linux - Software 6 08-18-2004 02:43 PM
How do I get a dump file (.sql) into MySql? TreeDragon60 Linux - Software 4 03-21-2004 06:19 AM


All times are GMT -5. The time now is 07:36 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration