Solved

MySQL dump does not dump data

Posted on 2009-04-10
6
787 Views
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?
0
Comment
Question by:ti57
[X]
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
6 Comments
 
LVL 3

Expert Comment

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

Try using phpmyadmin and dump structure and data
0
 

Author Comment

by:ti57
ID: 24119705
Need an automated solution
0
 
LVL 3

Expert Comment

by:QualitySoftwareDevelopment
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`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- 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
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 3

Expert Comment

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

Author Comment

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

Accepted Solution

by:
theGhost_k8 earned 500 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: mysql-backup.sh

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

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 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