'MySQLDump stops after 664 of 741 tables - only structure

I have a PHP-script to dump the "structure only" of a database with a total of 741 tables.

Im calling "shell_exec" which works fine.

The reason is, sadly... I do not have any shell-access, root or SUPER privileges on the database, (but i can execute PHP scripts on remote server) and I have SELECT permissions on all tables.

I want to dump the DB to clone for a local test-environment

My command template:

mysqldump --compress --add-drop-database --single-transaction=TRUE --add-drop-table --no-data --host=%host% --port=%port% --user=%username% %password% %databasename% > %targetfile%

In general it totally works, but for an odd reason, always at table #640 out of 741 the mysqldump all of a sudden stops. But it stops clean at the end of the structure-dump of table 640 and importing the .sql file works fine.

Only that 101 tables are missing and I see no reason why.

I tried max_allowed_packed=1G (on server is 104 MB, should be enough for structure only). Result file with 640 tables has only 809kb of size.

I tried --quick and --compress and several other options but it wont work it simply stops with no error at table #640.

Does mysqldump know any natural limit or any option I didnt see yet?

My workarround would be use SHOW TABLES, result in array, split list in half and fire 2 command and assemble the result together.

But that "should not be" the solution. Maybe someone seen this strange behaviour before.

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source