Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


MySQL dump does not dump data

Posted on 2009-04-10
Medium Priority
Last Modified: 2012-05-06
When using the mysql dump, the resulting sql files do not contain any of the data.  The database itself is at least 15MB, but the dump files are 4kb.  Is there an easy way to dump the ENTIRE thing?

Larger question: are there any recommendations for MySQL backup to Amazon S3?
Question by:ti57
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 24119229
Sounds like you only dumps the structure and not the data?!

Try using phpmyadmin and dump structure and data

Author Comment

ID: 24119705
Need an automated solution

Expert Comment

ID: 24120112
ok, well phpmyadmin sqlcode goes like this:

-- Struktur-dump for tabellen `qsd_user`

CREATE TABLE `qsd_user` (
  `UserID` int(11) NOT NULL auto_increment,
  `UserName` text NOT NULL,
  UNIQUE KEY `UserID` (`UserID`)

-- Data dump for tabellen `qsd_user`

INSERT INTO `qsd_user` (`UserID`, `UserUser`) VALUES (1, 'Smith');
INSERT INTO `qsd_user` (`UserID`, `UserUser`) VALUES (2, 'Walter');
INSERT INTO `qsd_user` (`UserID`, `UserUser`) VALUES (3, 'John');

so it seems like you need to select * from table_name and then parse INSERT lines in you dumpfile
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.


Expert Comment

ID: 24120123
The UserUser in the INSERT lines is ofcourse UserName instead

Author Comment

ID: 24120500
Looking for a scriptable mysql dump solution...not sure what to do with myphpadmin code above...
LVL 21

Accepted Solution

K V earned 2000 total points
ID: 24121013
use a shell script with a mysqldump command and put that in cron.
You also may zip the data if its consuming too much space.
You also may use rsync / sftp to move it to other backup machine.

Enter following line in:

mysqldump -uROOT -pPASSWORD --databases DATABASE-NAME(S) > DB-DUMP_`date +%d_%m_%y`
gzip DB-DUMP_`date +%d_%m_%y`


Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
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 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:…
Suggested Courses

721 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