pmiranda
pmiranda

Reputation: 8420

database dump file on Navicat is larger tan mysql dump

I didn't know if to ask this on Superuser or SO, but I read much more info about Navicat and sql dump files here than there.

If I dump my database with the default settings on Navicat it's size is like 490MB, but via command line with mysql dump it's just like 290MB. What is happening?

Upvotes: 1

Views: 1577

Answers (1)

papkass
papkass

Reputation: 1289

mysqldump only dump data. Stuff like indexes will also take up disk space but not be included in the dump.

If you want to run some sort of integrity test on your database, you can count the rows in each table and compare them. Or try this query, that will give you a more accurate disk usage number, than looking at disk usage on your hard drive.

SELECT table_schema "Data Base Name", 
sum( data_length + index_length ) / 1024 / 
1024 "Data Base Size in MB", 
sum( data_free )/ 1024 / 1024 "Free Space in MB" 
FROM information_schema.TABLES 
GROUP BY table_schema ; 

Upvotes: 1

Related Questions