Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

mysqldump Only Some Records Because Database is So Large

Posted on 2007-11-27
2
Medium Priority
?
1,043 Views
Last Modified: 2010-05-18
I am setting up a development system and need some critical tables, many of them which only contain 100 or less rows. Some of the tables contain GB of info that I don't wan to copy over. I have done mysqldump to get just the schema, is there any way to limit the table data dump to let's say 1000 rows for each table? Or maybe just grab the info from the tables that contain less than 1000 rows?
0
Comment
Question by:dignified
2 Comments
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 500 total points
ID: 20358462
If you know the table names which contain less rows, mention them in when taking dump.

If you have phpmyadmin then you can dump your required rows. But you have to  perform this operation on each table separately.
0
 

Author Comment

by:dignified
ID: 20363828
Yeah I was afraid of this. Since the databases are on the same system it isn't too bad. Just have to write a php script or something to do it.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question