MySQL dump does not dump data

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?
ti57Asked:
Who is Participating?
 
theGhost_k8Connect With a Mentor Database ConsultantCommented:
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
 
QualitySoftwareDevelopmentCommented:
Sounds like you only dumps the structure and not the data?!

Try using phpmyadmin and dump structure and data
0
 
ti57Author Commented:
Need an automated solution
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
QualitySoftwareDevelopmentCommented:
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
 
QualitySoftwareDevelopmentCommented:
The UserUser in the INSERT lines is ofcourse UserName instead
0
 
ti57Author Commented:
Looking for a scriptable mysql dump solution...not sure what to do with myphpadmin code above...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.