Results 1 to 4 of 4

Thread: SQL command backup smaller then phpmyadmin's full backup

  1. #1
    Join Date
    Sep 2019
    Posts
    19

    SQL command backup smaller then phpmyadmin's full backup

    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!

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,743
    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.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Sep 2019
    Posts
    19
    Quote Originally Posted by zEitEr View Post
    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...

  4. #4
    Join Date
    May 2008
    Location
    Bulgaria
    Posts
    969
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •