2

This question relates to the file size resulting from phpmyadmin export.

I am exporting a table using phpmyadmin export.

I had exported the table with 10M rows a few days back.

Now the table has 15M rows. Now, when I export that same table again, the resulting table1.sql file size is less than before. I am using exactly the same export settings (the max query size, etc.)

I have not used compression either time. I am exporting to a flat .sql query file containing 'INSERT INTO' queries.

Is this possible ? Perhaps someone can shed light on the situation.

Couple of things that may be relevant - - phpmyadmin shows a row count smaller than the exact row count next to 'Dump some row(s):'

(Unfortunately, I can't attach either export file - they are just too big.)

h0wm
  • 21
  • 1
  • 3
  • Look in the PHP error log, or check the last few lines of the file to see if it completed or failed – RiggsFolly Sep 07 '16 at 15:44
  • Good suggestion. No errors there. phpmyadmin displays message 'completed successfully', so I assume that there were no errors encountered. – h0wm Sep 07 '16 at 16:01
  • Possible duplicate of [PHP regular backup of mysql data](http://stackoverflow.com/questions/38916163/php-regular-backup-of-mysql-data) – e4c5 Sep 08 '16 at 06:15
  • Better use mysqldump ***`mysqldump -p -u username DATABASE table --where="datefield >= 'start date' AND datefield <= 'end date')`*** – abdul rashid Mar 10 '20 at 10:02

1 Answers1

1

PHPmyadmin is loaded through Apache, which has a max_execution_time usually configured to 60 seconds. If PHPMyadmin takes more time than max_execution_time then phpmyadmin task wont be complete.

You can increase the max_execution_time to maximum time, but it will affect your every website served through Apache on this server.

Recommended is, export data through mysqldump tool in terminal

mysqldump -p -u username DATABASE

If you want to export particular table mysqldump -p -u username DATABASE table

If you want to add where condition to export

mysqldump -p -u username DATABASE table --where="Yourfield >= 'start date' AND Yourfield <= 'end date')

abdul rashid
  • 730
  • 9
  • 21