Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 12-27-2007, 11:08 AM   #1
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.

Old 12-27-2007, 12:38 PM   #2
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
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, 01:55 PM   #3
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


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 08:30 PM
SQL: old sql dump not loading into new db BrianK Linux - Software 1 07-25-2006 11:55 PM
Massive SQL dump without local access. xconspirisist Linux - General 1 01-30-2005 10:07 AM
Dump filesystem table fransemail Linux - Software 6 08-18-2004 01:43 PM
How do I get a dump file (.sql) into MySql? TreeDragon60 Linux - Software 4 03-21-2004 05:19 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:51 PM.

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