SQL command backup smaller then phpmyadmin's full backup

borgqueenx

Verified User
Joined
Sep 2, 2019
Messages
19
https://i.imgur.com/R82pvSI.png

As you can see, the command on the left that i executed, made a file thats approx 90mB. Phpmyadmin makes a file of 144mB with its export feature.

Any idea how?
Is there a easy way to see if the exported sql works, without using my existing databases?

Thanks!
 
Hello,

re-import your dump into a test table, just make sure first it does not include statements USE database_name; If it includes you will need to remove the line or rename the database name in it.
 
Hello,

re-import your dump into a test table, just make sure first it does not include statements USE database_name; If it includes you will need to remove the line or rename the database name in it.

Would you know if its normal that phpmyadmin dumps are way bigger?
And that sounds tricky and difficult, especially since i dont know if i can import the whole dump into a single table? it dumps all databases into the single sql file with mysqldump...

thanks for any help...
 
It is normal.

Check out all the options that mysqldump gives you. For example --add-drop-database, --add-drop-table, --add-locks, --comments, --complete-insert, --extended-insert, etc (some are enabled by default) - they do increase the size of the dump. Contrary there are others which do reduce it - for example the --default-character-set one.

Generally PHPMyAdmin is doing it's export in a way that it tries them to be maximally compatible with other systems. It also by default adds comments too which is a big increase in the dump size (I think it can be disabled on the export page).

What you can do is you can open both dumps in good text editor - for example Notepad++. You'll see what I am talking about. They will contain "the same data"... but the SQL around it and the comments will be different - not much different, but it will cost characters for each query.
 
Back
Top