Hello developers, and congratulations for the excellent work being done here ...
I don't know anyone has ever had this need, but I'll try to pose the question:
is it possible to call the phpmyadmin table export functionality via a php script, through the curl command, to export MySql db tables without having to use the phpmyadmin interface?
I did some tests but, although php doesn't give me any errors, the exported .sql file is always empty (and no phpmyadmin errors are caught).
I'm calling curl on the page, https://localhost/phpmyadmin/libraries/classes/export.php to which I pass (via curl options) authentication credentials, the name of the db and the table to export; (I have doubts about how to pass the token, if requested by script, but I would expect at least some authentication errors from phpmyadmin, and instead no errors...)
I know that normally for this purpose I can use other main methods, like 1) export directly from a php script or 2) use mysqldump, but with the first method (php script) I don't get a precise and complete export like the one done by phpmyadmin (and this then causes me problems restoring the data), and for the second (mysqldump) the provider that manages the server prevents me, for security reasons, use exec() from php code; and also I can't just use a cron procedure to use mysqldump, as I would like to be able to export the db tables on demand.
So I'm looking for alternative ways to export the MySql db in the optimal way as phpmyadmin does, and so I thought about using phpmyadmin as a web service, but I don't know if the idea is viable;
thanks in advance to anyone with any advice;
Giovanni